From: yomguy Date: Wed, 21 Mar 2012 16:31:43 +0000 (+0100) Subject: add thumbnails to items and collections X-Git-Tag: 1.4.3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=2359393e483c22a659c617524393dda88bb6e389;p=telemeta.git add thumbnails to items and collections --- diff --git a/telemeta/templates/telemeta/inc/collection_related.html b/telemeta/templates/telemeta/inc/collection_related.html index 9f735696..1f1f2d38 100644 --- a/telemeta/templates/telemeta/inc/collection_related.html +++ b/telemeta/templates/telemeta/inc/collection_related.html @@ -1,5 +1,6 @@ {% load i18n %} {% load telemeta_utils %} +{% load thumbnail %}

{% trans "Related media" %}

@@ -55,14 +56,21 @@ - {% if media.is_image %} - {% if media.url %} - - - {% else %} - - - {% endif %} + + {% if media.is_image %} + {% if media.file %} + + {% thumbnail media.file "420" as im %} + + {% endthumbnail %} + + {% else %} + + {% thumbnail media.url "420" as im %} + + {% endthumbnail %} + + {% endif %} {% else %} {% if media.url %} {% if "youtu" in media.url %} diff --git a/telemeta/templates/telemeta/inc/mediaitem_related.html b/telemeta/templates/telemeta/inc/mediaitem_related.html index 458c2669..e771f6d2 100644 --- a/telemeta/templates/telemeta/inc/mediaitem_related.html +++ b/telemeta/templates/telemeta/inc/mediaitem_related.html @@ -1,5 +1,6 @@ {% load i18n %} {% load telemeta_utils %} +{% load thumbnail %}

{% trans "Related media" %}

@@ -55,14 +56,21 @@ - {% if media.is_image %} - {% if media.url %} - - - {% else %} - - - {% endif %} + + {% if media.is_image %} + {% if media.file %} + + {% thumbnail media.file "420" as im %} + + {% endthumbnail %} + + {% else %} + + {% thumbnail media.url "420" as im %} + + {% endthumbnail %} + + {% endif %} {% else %} {% if media.url %} {% if "youtu" in media.url %}