Merge remote branch 'remotes/jwandborg/feature_400-resize_images_to_fit_page'
authorChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 3 Jul 2011 00:00:01 +0000 (19:00 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Sun, 3 Jul 2011 00:00:01 +0000 (19:00 -0500)
Conflicts:
mediagoblin/templates/mediagoblin/user_pages/media.html

1  2 
mediagoblin/templates/mediagoblin/user_pages/media.html

index e84c98725f73abc72cccd18d2bc080a5cabb685a,e16f1e002808c9e598453ec316313ac373e984f3..0c13f5c441c14ed25845e01ea09838f77f054e08
  {% import "/mediagoblin/utils/wtforms.html" as wtforms_util %}
  
  {% block mediagoblin_content %}
 -  {# temporarily, an "image gallery" that isn't one really ;) #}
    {% if media %}
      <div class="grid_8 alpha media_image">
-       <img src="{{ request.app.public_store.file_url(
-                     media.media_files.main) }}" />
 -      <h1>
 -        {{media.title}}
 -      </h1>
+       {% if media.media_files.medium %}
+         <img class="media_image" src="{{ request.app.public_store.file_url(
+                                     media.media_files.medium) }}" />
+       {% else %}
+         <img class="media_image" src="{{ request.app.public_store.file_url(
+                   media.media_files.main) }}" />
+       {% endif %}
++
 +      <h2>
 +        {{media.title}}
 +      </h2>
 +
 +      {% autoescape False %}
 +        <p>{{ media.description_html }}</p>
 +      {% endautoescape %}
 +
        <p>
 -        Uploaded on
 +        &mdash;&nbsp;uploaded on
          {{ "%4d-%02d-%02d"|format(media.created.year,
                                    media.created.month, media.created.day) }}
          by