From: Jérémy Fabre Date: Fri, 23 Sep 2016 09:57:00 +0000 (+0200) Subject: Home events in body and slider X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6b0b164b0f41c2fb1df3006b4435a15778380bd8;p=mezzo.git Home events in body and slider --- 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 }}