From: Emilie Date: Thu, 29 Sep 2016 13:00:29 +0000 (+0200) Subject: Event by month X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=86e14f0289a73936f117ae3ae0d30c0f95034854;p=mezzo.git Event by month --- diff --git a/app/templates/agenda/event_list.html b/app/templates/agenda/event_list.html index d3014bed..b0c3e67f 100644 --- a/app/templates/agenda/event_list.html +++ b/app/templates/agenda/event_list.html @@ -109,9 +109,9 @@
-{% for event in events.object_list %} - {% include 'agenda/includes/event_card.html' %} -{% endfor %} + {% for event in events.object_list %} + {% include 'agenda/includes/event_card.html' %} + {% endfor %}
diff --git a/app/templates/agenda/includes/event_card.html b/app/templates/agenda/includes/event_card.html index 1feff705..76cd1405 100644 --- a/app/templates/agenda/includes/event_card.html +++ b/app/templates/agenda/includes/event_card.html @@ -1,40 +1,43 @@ {% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %} {% block event_list_event_title %} -
- {% with event.images.all|get_type:'card' as images %} - {% if images %} - {% block event_list_event_featured_image %} - - - - {% endblock %} - {% endif %} - {% endwith %} -

- {{ event.title }} -

- {{ event.description|slice:":128" }} -{% endblock %} +
+ {% ifchanged event.start.month %} +

{{ event.start|date:'F' }}

+ {% endifchanged %} + {% with event.images.all|get_type:'card' as images %} + {% if images %} + {% block event_list_event_featured_image %} + + + + {% endblock %} + {% endif %} + {% endwith %} +

+ {{ event.title }} +

+ {{ event.description|slice:":128" }} + {% endblock %} -{% block event_list_event_metainfo %} - {% with False as unit_booking %} - {% include "agenda/includes/event_metainfo.html" %} + {% block event_list_event_metainfo %} + {% with False as unit_booking %} + {% include "agenda/includes/event_metainfo.html" %} {% for child in event.children.all %} - {% with child as event %} - {% include "agenda/includes/event_metainfo.html" %} - {% endwith %} + {% with child as event %} + {% include "agenda/includes/event_metainfo.html" %} + {% endwith %} {% endfor %} - {% endwith %} -{% endblock %} + {% endwith %} + {% endblock %} -{% block event_list_event_content %} - {% comment %} -
- {{ event.description_from_content|safe }} - {% trans "read more" %} -
- {% endcomment %} + {% block event_list_event_content %} + {% comment %} +
+ {{ event.description_from_content|safe }} + {% trans "read more" %} +
+{% endcomment %} {% endblock %} {% block booking %}