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

index 41b66228f6ec059dc4f69d5d124cdeb72a2877a2..84610994fb5b3d5a83ec8d34396f6cbe069b3905 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "agenda/event_list.html" %}
-{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags  %}
+{% load mezzanine_tags comment_tags keyword_tags rating_tags i18n future disqus_tags event_tags organization_tags %}
 
 {% block meta_title %}{{ event.meta_title }}{% endblock %}
 
 {% endblock %}
 
 {% block event_detail_featured_image %}
-{% if settings.EVENT_USE_FEATURED_IMAGE and event.featured_image %}
-<p>
-    <img src="{{ MEDIA_URL }}{% thumbnail event.featured_image 600 0 %}">
-</p>
-{% endif %}
+{% with event.images.all|get_type:'page_slider' as image %}
+  {% if image %}
+    <p>
+        <img src="{{ MEDIA_URL }}{% thumbnail image.file 600 0 %}">
+    </p>
+  {% endif %}
+{% endwith %}
 {% endblock %}
 
 {% if settings.COMMENTS_DISQUS_SHORTNAME %}
index a53b1762b7372fa237d0f55c677652135f9ec0e1..d3014bed8b3eb5278c27f5d1e1638191bdbedba3 100644 (file)
@@ -1,5 +1,5 @@
 {% extends "base.html" %}
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags %}
+{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
 
 {% block meta_title %}{% if page %}{{ page.richtextpage.meta_title }}{% else %}{% trans "Events" %}{% endif %}{% endblock %}
 
index cb3d0e57a7c5e4607302eb754a4f0c823d952a19..944cb2edf855e18a08944a779faea1c873ccd7c1 100644 (file)
@@ -1,14 +1,17 @@
-{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags %}
+{% load i18n future mezzanine_tags event_tags keyword_tags disqus_tags organization_tags %}
 
 {% block event_list_event_title %}
     <div class="event__card msry__item">
-        {% if event.featured_image %}
+      {% with event.images.all|get_type:'card' as image %}
+        {% if image %}
             {% block event_list_event_featured_image %}
+
                 <a href="{{ event.get_absolute_url }}" class="event__thumbnail">
-                    <img src="{{ MEDIA_URL }}{% thumbnail event.featured_image 500 500 %}" width="500" height="500">
+                    <img src="{{ MEDIA_URL }}{% thumbnail image.file 500 500 %}" width="500" height="500">
                 </a>
             {% endblock %}
         {% endif %}
+      {% endwith %}
         <h3 class="event__name">
             <a href="{{ event.get_absolute_url }}">{{ event.title }}</a>
         </h3>
 </a>
 {% endblock %}
 
-{% comment %}
-{% block event_list_event_links %}
-<div class="event__detail">
-{% keywords_for event as tags %}
-{% if tags %}
-<ul class="list-inline tags">
-{% trans "Tags" %}:
-{% spaceless %}
-{% for tag in tags %}
-<li><a href="{% url "event_list_tag" tag.slug %}" class="tag">{{ tag }}</a></li>
-{% endfor %}
-{% endspaceless %}
-</ul>
-{% endif %}
-<p>
-{% if event.allow_comments %}
-/
-{% if settings.COMMENTS_DISQUS_SHORTNAME %}
-<a href="{{ event.get_absolute_url }}#disqus_thread"
-    data-disqus-identifier="{% disqus_id_for event %}">
-    {% trans "Comments" %}
-</a>
-{% else %}
-<a href="{{ event.get_absolute_url }}#comments">
-    {% blocktrans count comments_count=event.comments_count %}{{ comments_count }} comment{% plural %}{{ comments_count }} comments{% endblocktrans %}
-</a>
-{% endif %}
-{% endif %}
-</p>
-</div>
-{% endblock %}
-{% endcomment %}
-
 </div>