From f9a253bc2f636d299480dfce81fbbf0ebb0a76cd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Fri, 23 Sep 2016 12:05:12 +0200 Subject: [PATCH] Add the department to event generic card and slider templates --- app/templates/home/inc/generic_card.html | 17 +++++++++++------ app/templates/home/inc/slider.html | 15 ++++++++++----- 2 files changed, 21 insertions(+), 11 deletions(-) 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 %}
-- 2.39.5