]> git.parisson.com Git - mezzo.git/commitdiff
Fix external projet display (fix #245), fix more date display
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 7 Oct 2016 14:33:59 +0000 (16:33 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 7 Oct 2016 14:33:59 +0000 (16:33 +0200)
app/templates/agenda/includes/event_date.html
app/templates/projects/project_detail.html

index c34460f59eb048c107ad216f73cb2b2a9f52c62e..ed5824c8958dce5d8e7d3cf2bd7c90ab500e90dd 100644 (file)
@@ -27,7 +27,7 @@
                 {% if period.date_to and period.date_to|date:"H:i" != "23:59" %}
                     {{ period.date_from|date:"H\hi" }} - {{ period.date_to|date:"H\hi" }}<br>
                 {% else %}
-                    {% if forloop.last %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
+                    {% if forloop.last or event.periods.all|length == 2 %} {% trans "and"%} {% elif not forloop.first %}, {% endif %}
                         {{ period.date_from|date:"H\hi" }}
                 {% endif %}
             {% endfor %}
@@ -42,7 +42,7 @@
                 {{ period.date_from|date:"j F" }} {% trans "from" %} {{ period.date_from|date:"H\hi" }} {% trans "to" %} {{ period.date_to|date:"H\hi" }}<br>
             {% else %}
                 {% if event.periods.all|length > 1 and not forloop.last %}
-                    {{ period.date_from|date:"j" }},
+                    {{ period.date_from|date:"j" }}{% if event.periods.all|length == 2 %} {% trans "and" %} {% else %}, {% endif %}
                 {% else %}
                     {{ period.date_from|date:"j F" }}
                     {% if event.periods.all|length > 1 and forloop.first %} {% trans "and" %}{% endif %}
index 2c9d607db55f1b7788fffa7e9a643eb710bc207d..e48e389e3bd2b64c00c3c69482cbc2b33cfe93f0 100644 (file)
 
 {% block page_sub_content %}
 
-    {% if project.type == 'external project' %}
+    {% if project.type == 'external' %}
         <div class="white-bg pb2">
             <hr class="mt0 invisible" />
             <div class="page__block page__block--yellow">