From 2359393e483c22a659c617524393dda88bb6e389 Mon Sep 17 00:00:00 2001 From: yomguy Date: Wed, 21 Mar 2012 17:31:43 +0100 Subject: [PATCH] add thumbnails to items and collections --- .../telemeta/inc/collection_related.html | 24 ++++++++++++------- .../telemeta/inc/mediaitem_related.html | 24 ++++++++++++------- 2 files changed, 32 insertions(+), 16 deletions(-) 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 %} -- 2.39.5