]> git.parisson.com Git - teleforma.git/commitdiff
fix
authoryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 15:09:04 +0000 (17:09 +0200)
committeryomguy <yomguy@parisson.com>
Wed, 18 Jul 2012 15:09:04 +0000 (17:09 +0200)
teleforma/templates/teleforma/inc/media_list.html

index b8942caf7deb51285ad6eeb5c434d237c81c2bf2..3b11800889f12c18321fb2ed3673f6c18958a627 100644 (file)
             <tr>
             <td {% if forloop.first %}class="border-top"{% endif %} width="35%">
                 <a href="{% url teleforma-media-detail media.id %}" title="{% trans "View" %}">
-                 {% if media.item.related.file %}
-                  <img src="{% url telemeta-item-related media.item.code media.item.related.pk %}" style="max-width: 230px; max-height: 200px;" alt="snapshot" />
+                 {% if media.item.related.all %}
+                 {% for related in media.item.related %}
+                  {% if related.title == "preview"}
+                  <img src="{% url telemeta-item-related media.item.code related.id %}" style="max-width: 230px; max-height: 200px;" alt="snapshot" />
+                  {% endif %}
+                 {% endfor %}
                  {% endif %}
                 </a>
             </td>