From 6b0b164b0f41c2fb1df3006b4435a15778380bd8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Je=CC=81re=CC=81my=20Fabre?= Date: Fri, 23 Sep 2016 11:57:00 +0200 Subject: [PATCH] Home events in body and slider --- app/templates/home/inc/generic_card.html | 16 ++++++++++++---- app/templates/home/inc/slider.html | 13 ++++++++++--- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/app/templates/home/inc/generic_card.html b/app/templates/home/inc/generic_card.html index 7a03c0b7..6307cdc5 100644 --- a/app/templates/home/inc/generic_card.html +++ b/app/templates/home/inc/generic_card.html @@ -21,7 +21,15 @@ {% endif %} {% elif body.content_type.model == 'event' %} - {% trans 'Event' %} +
+
+ {% if body.content_object.category %} + {{ body.content_object.category }} + {% else %} + {% trans 'Event' %} + {% endif %} +
+
{% endif %} @@ -40,13 +48,13 @@ {% if body.content_object.end %} {% trans "From" %} {% endif %} - {{ body.content_object.start }} + {{ body.content_object.start|date:"DATE_FORMAT" }} {% if body.content_object.end %} - {% trans "to" %} {{ body.content_object.end }} + {% trans "to" %} {{ body.content_object.end|date:"DATE_FORMAT" }} {% endif %} {% endif %} {% if body.content_object.location %} - {{ body.content_object.location }} +
{{ body.content_object.location }} {% endif %} {% endif %} diff --git a/app/templates/home/inc/slider.html b/app/templates/home/inc/slider.html index 3460f5d8..6a4f327a 100644 --- a/app/templates/home/inc/slider.html +++ b/app/templates/home/inc/slider.html @@ -22,7 +22,11 @@ {% elif slider.content_type.model == 'event' %}
- {% trans 'Event' %} + {% if slider.content_object.category %} + {{ slider.content_object.category }} + {% else %} + {% trans 'Event' %} + {% endif %}
{% endif %} @@ -36,11 +40,14 @@ {% if slider.content_object.end %} {% trans "From" %} {% endif %} - {{ slider.content_object.start }} + {{ slider.content_object.start|date:"DATE_FORMAT" }} {% if slider.content_object.end %} - {% trans "to" %} {{ slider.content_object.end }} + {% trans "to" %} {{ slider.content_object.end|date:"DATE_FORMAT" }} {% endif %} {% endif %} + {% if slider.content_object.location %} +
{{ slider.content_object.location }} + {% endif %}
{{ slider.content_object.description|richtext_filters|safe|truncatechars_html:200 }} -- 2.39.5