]> git.parisson.com Git - mezzo.git/commitdiff
Fix event images against get_type filter
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 25 Aug 2016 15:59:19 +0000 (17:59 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 25 Aug 2016 15:59:19 +0000 (17:59 +0200)
app/templates/agenda/event_detail.html
app/templates/agenda/includes/event_card.html

index 84610994fb5b3d5a83ec8d34396f6cbe069b3905..264754443bcb10aaaba21820f2ebe9e5142cfde3 100644 (file)
 {% endblock %}
 
 {% block event_detail_featured_image %}
-{% with event.images.all|get_type:'page_slider' as image %}
-  {% if image %}
+{% with event.images.all|get_type:'page_slider' as images %}
+  {% if images %}
     <p>
-        <img src="{{ MEDIA_URL }}{% thumbnail image.file 600 0 %}">
+        <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 600 0 %}">
     </p>
   {% endif %}
 {% endwith %}
index 944cb2edf855e18a08944a779faea1c873ccd7c1..1feff705306441897fabec85a6ef32ae7fe69ffa 100644 (file)
@@ -2,12 +2,11 @@
 
 {% block event_list_event_title %}
     <div class="event__card msry__item">
-      {% with event.images.all|get_type:'card' as image %}
-        {% if image %}
-            {% block event_list_event_featured_image %}
-
+      {% with event.images.all|get_type:'card' as images %}
+        {% if images %}
+              {% block event_list_event_featured_image %}
                 <a href="{{ event.get_absolute_url }}" class="event__thumbnail">
-                    <img src="{{ MEDIA_URL }}{% thumbnail image.file 500 500 %}" width="500" height="500">
+                    <img src="{{ MEDIA_URL }}{% thumbnail images.0.file 500 500 %}" width="500" height="500">
                 </a>
             {% endblock %}
         {% endif %}