From 9b424b17ccb6b6c034755925b14f9cfda23ad29a Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Sun, 21 Aug 2011 23:39:59 -0500 Subject: [PATCH] Feature #506: link to original sized image if we scaled the image down. --- .../mediagoblin/user_pages/media.html | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/mediagoblin/templates/mediagoblin/user_pages/media.html b/mediagoblin/templates/mediagoblin/user_pages/media.html index 2086d3d6..6747fddc 100644 --- a/mediagoblin/templates/mediagoblin/user_pages/media.html +++ b/mediagoblin/templates/mediagoblin/user_pages/media.html @@ -24,9 +24,24 @@ {% if media %}
- + {% set display_media = request.app.public_store.file_url( + media.get_display_media(media.media_files)) %} + + {# if there's a medium file size, that means the medium size + # isn't the original... so link to the original! + #} + {% if media['media_files'].has_key('medium') %} + + Image for {{ media.title }} + + {% else %} + Image for {{ media.title }} + {% endif %}

-- 2.25.1