]> git.parisson.com Git - mezzo.git/commitdiff
fix event detail date
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 31 Mar 2016 18:50:23 +0000 (20:50 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 31 Mar 2016 18:50:32 +0000 (20:50 +0200)
app/templates/agenda/event_detail.html

index 803ab3a0e7e412835bb09d912e26d6b1ce61caf1..491d9f282bc1025c3d0d811dc7fa786e3fd75bba 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "agenda/event_list.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags %}
+{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags festival_tags %}
 
 {% block meta_title %}{{ event.meta_title }}{% endblock %}
 
@@ -29,8 +29,7 @@
     <div class="event__meta__inner">
         {{ event.start }}
         {% if event.end %}
-        <br>
-        {% if event.end|date == event.start|date %}{{ event.end|time:"TIME_FORMAT" }}{% else %}{{ event.end }}{% endif %}
+        {% if event.end|date == event.start|date and event.end.hour|subtract:event.start.hour > 3 %}{{ event.end|time:"TIME_FORMAT" }}{% endif %}
         {% endif %}
         {% if event.location %}
         <a href="{% url "event_list_location" event.location.slug %}" class="event__meta__location">{{ event.location }}</a>