summaryrefslogtreecommitdiff
path: root/chimere/templates/chimere/blocks/welcome.html
blob: a0052f5d2f9cb1c527dbe28a63bd93e253d4b0c5 (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
52
53
54
55
56
57
58
59
60
61
62
{% load i18n sanitize chimere_tags %}
{% if news_lst or welcome_message %}
<a href='#' id='welcome_button' class='ui-widget ui-button ui-state-default ui-corner-all'>{% trans "Welcome message"%}</a>
<script type='text/javascript'>
function display_welcome(){
    var width = $(window).width();
    width = width - 40*width/100;
    var height = $(window).height()-200;
    $("#welcome").dialog({title:"{% trans "Welcome"%}",
                          width:width, height:height});
}
$("#welcome_button").bind('click', display_welcome);
$(function(){
    $('#welcome div.media-player').jmeEmbedControls();
    $('#welcome video').each(function(index){$(this).pause()});
    $('#welcome audio').each(function(index){$(this).pause()});
    {% if display %}display_welcome();{%endif%}
});
</script>
<div id='welcome' style='display:none'>
    <div id='news_content'>
        {% if welcome_message %}
        <div id='welcome_message'>
            {{welcome_message|safe}}
        </div>
        {% endif %}
        <div class='news'>
            {% if news_lst %}
                {% for news in news_lst %}
                    <div class='info'>
                        {% if news.title %}
                            <h3>{{news.title}} &ndash; {{ news.date }}</h3>
                            <p>{{news.content|safe}}</p>
                        {% else %}
                            <h3>{{news.name}} &ndash; {{ news.start_date }}{% if news.end_date %} - {{ news.end_date }}{% endif %}</h3>
                            {% if news.default_pictures or news.default_pictures or news.default_multimedia_items%}
                            <div class='small-gallery'>
                            {% for picture in news.default_pictures %}
                                {% multimedia_render picture %}
                            {%endfor%}
                            {% for multimedia_item in news.default_multimedia_items %}
                                {% multimedia_render multimedia_item %}
                            {%endfor%}
                            </div>
                            {%endif%}
                            {% if news.description %}
                                <p class='description'>{{news.description|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe}}</p>
                            {% endif %}
                            {% for property in news.getProperties %}
                                <p class='{{news.propertymodel.getNamedId}}'>{{ property.value|sanitize:"p b i br hr strong em img:src:alt span:style a:href:target ul li ol h1 h2 h3 h4 table td th tr"|safe }}</p>
                            {% endfor %}
                            <p class='marker_link'><a href='{% get_tinyfied_url news map_name %}'>{% trans "See it on the map"%}</a></p>
                        {% endif %}
                    </div>
                {%endfor%}
            {% endif %}
            <div class='info'>
            </div>
        </div>
    </div>
</div>
{% endif %}