]> git.parisson.com Git - mezzo.git/commitdiff
Home events in body and slider
authorJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 23 Sep 2016 09:57:00 +0000 (11:57 +0200)
committerJérémy Fabre <Jeremy@iMac-de-Jeremy.local>
Fri, 23 Sep 2016 09:57:00 +0000 (11:57 +0200)
app/templates/home/inc/generic_card.html
app/templates/home/inc/slider.html

index 7a03c0b7e819c737555bdc8c05e6b673ee744efe..6307cdc596c3b8843a036143c32d0b9d1483065e 100644 (file)
                 {% endif %}
             </div>
         {% elif body.content_type.model == 'event' %}
-            {% trans 'Event' %}
+        <div class="article-box__tags">
+            <div class="tag tag--small tag--category">
+                {% if body.content_object.category %}
+                    {{ body.content_object.category }}
+                {% else %}
+                    {% trans 'Event' %}
+                {% endif %}
+            </div>
+        </div>
         {% endif %}
     </div>
 
                     {% 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 }}
+                     <br /><strong>{{ body.content_object.location }}</strong>
                 {% endif %}
             {% endif %}
         </div>
index 3460f5d82b86276a9d46dd36702b1bf0d17f3cee..6a4f327a85a6edf9303f2dc7b87fb983d0b844a3 100644 (file)
                                                 </div>
                                                 {% elif slider.content_type.model == 'event' %}
                                                 <div class="tag tag--category">
-                                                    {% trans 'Event' %}
+                                                    {% if slider.content_object.category %}
+                                                        {{ slider.content_object.category }}
+                                                    {% else %}
+                                                        {% trans 'Event' %}
+                                                    {% endif %}
                                                 </div>
                                                 {% endif %}
 
                                                             {% 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 %}
+                                                             <br /><strong>{{ slider.content_object.location }}</strong>
+                                                        {% endif %}
                                                     </div>
                                                     <div class="article-box__desc">
                                                         {{ slider.content_object.description|richtext_filters|safe|truncatechars_html:200 }}