summaryrefslogtreecommitdiff
path: root/templates/chimere/blocks/news.html
blob: 4c46690214a3a4c6498b8dd32fb10e59e49bee0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{% load i18n sanitize chimere_tags %}

<div class="modal fade" id="modal-news" tabindex="-1" role="dialog"
     aria-labelledby="modal-news-label" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <h2>{% trans "News" %}</h2>
                <div class='news'>
                    {% if news_lst %}
                    {% for news in news_lst %}
                    <div class='info'>
                        {% if news.title %}
                        <h4>{{news.title}} &ndash; {{ news.date }}</h4>
                        {{news.content|safe}}
                        {% else %}
                        <h4>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h4>
                        {% if news.description %}
                        {{news.description|sanitize:"p b i br hr strong em span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}
                        {% endif %}
                        {% endif %}
                        <p class='marker_link'>
                            {% if news.point %}
                            <a href='{% get_tinyfied_url news area_name %}'>{% trans "See it on the map"%}</a>
                            {% endif %}{% if news.point and news.url %} - {% endif %}{% if news.url %}
                            <a href='{{news.url}}'>{% trans "Go to the event website"%}</a>
                            {% endif %}
                        </p>
                    </div>
                    {%endfor%}
                    {% else %}
                    <div class='info'>
                        <em>{% trans "No news today."%}</em>
                    </div>
                    {% endif %}
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">
                    {% trans "Close" %}
                </button>
            </div>
        </div>
    </div>
</div>