]> git.parisson.com Git - mezzo.git/commitdiff
Display linked orga without logo
authorEmilie <zawadzki@ircam.fr>
Mon, 6 Feb 2017 17:49:58 +0000 (18:49 +0100)
committerEmilie <zawadzki@ircam.fr>
Mon, 6 Feb 2017 17:49:58 +0000 (18:49 +0100)
app/templates/pages/page/includes/linked_organization_footer.html

index d93206bb49520a16d7d76dbbbf509deac522bc12..700ba3176d92e8b7a9cfa6eaddc116d8d0127c22 100644 (file)
@@ -1,9 +1,13 @@
 {% load organization_tags %}
 {% for lof in linked_organization_footer %}
-    {% if lof.images.all %}
+    {% if lof.images.all|length > 0 %}
     <a href="{{ lof.url }}" target="_blank" title="{{ lof.name }}">
-        {% with lof.images|get_type:"logo_white"|first as img %}
-            <img class="footer__partner" src="{{ MEDIA_URL }}{{ img }}" title="{{ img.title }}" width="120" height="66" />
+        {% with lof.images|get_type:"logo_white" as img %}
+            {% if img %}
+                {% with img|first as img %}
+                    <img class="footer__partner" src="{{ MEDIA_URL }}{{ img }}" title="{{ img.title }}" width="120" height="66" />
+                {% endwith %}
+            {% endif %}
         {% endwith %}
     </a>
     {% endif %}