From: Jérémy Fabre Date: Fri, 23 Sep 2016 10:05:12 +0000 (+0200) Subject: Add the department to event generic card and slider templates X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=f9a253bc2f636d299480dfce81fbbf0ebb0a76cd;p=mezzo.git Add the department to event generic card and slider templates --- diff --git a/app/templates/home/inc/generic_card.html b/app/templates/home/inc/generic_card.html index 6307cdc5..9a4f6cb9 100644 --- a/app/templates/home/inc/generic_card.html +++ b/app/templates/home/inc/generic_card.html @@ -22,13 +22,18 @@ {% elif body.content_type.model == 'event' %}
-
- {% if body.content_object.category %} + {% if body.content_object.departments.first %} + {% with body.content_object.departments.first as department %} +
+ {{ department.department.name }} +
+ {% endwith %} + {% endif %} + {% if body.content_object.category %} +
{{ body.content_object.category }} - {% else %} - {% trans 'Event' %} - {% endif %} -
+
+ {% endif %}
{% endif %} diff --git a/app/templates/home/inc/slider.html b/app/templates/home/inc/slider.html index 6a4f327a..acd26a62 100644 --- a/app/templates/home/inc/slider.html +++ b/app/templates/home/inc/slider.html @@ -21,13 +21,18 @@ {% trans 'News' %} {% elif slider.content_type.model == 'event' %} -
+ {% if slider.content_object.departments.first %} + {% with slider.content_object.departments.first as department %} +
+ {{ department.department.name }} +
+ {% endwith %} + {% endif %} {% if slider.content_object.category %} - {{ slider.content_object.category }} - {% else %} - {% trans 'Event' %} +
+ {{ slider.content_object.category }} +
{% endif %} -
{% endif %}