From: Christopher Allan Webber Date: Mon, 22 Aug 2011 04:39:59 +0000 (-0500) Subject: Feature #506: link to original sized image if we scaled the image down. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9b424b17ccb6b6c034755925b14f9cfda23ad29a;p=mediagoblin.git Feature #506: link to original sized image if we scaled the image down. --- 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 %}