Add titles to media entries in galleries
authorChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 22 Aug 2011 04:10:12 +0000 (23:10 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Mon, 22 Aug 2011 04:10:12 +0000 (23:10 -0500)
mediagoblin/static/css/base.css
mediagoblin/templates/mediagoblin/utils/object_gallery.html

index 51a855be9495838ca64183be1265b157f0ebf1eb..af8f77634f153545a7a62025eb0082ac4d4ad7e3 100644 (file)
@@ -244,6 +244,11 @@ text-align: center;
   text-align: center;
 }
 
+.media_thumbnail a {
+  color: #eee;
+  text-decoration: none;
+}
+
 /* media detail */
 
 h2.media_title{
index b451946d601de888d53673efb1ca1acffa176ad4..34eb7dbc8a6f48a7950057abafc9e34d666095c3 100644 (file)
                  {%- if loop.first %} thumb_row_first
                  {%- elif loop.last %} thumb_row_last{% endif %}">
         {% for entry in row %}
+          {% set entry_url = entry.url_for_self(request.urlgen) %}
           <td class="media_thumbnail thumb_entry
                      {%- if loop.first %} thumb_entry_first
                      {%- elif loop.last %} thumb_entry_last{% endif %}">
-            <a href="{{ entry.url_for_self(request.urlgen) }}">
+            <a href="{{ entry_url }}">
               <img src="{{ request.app.public_store.file_url(
                              entry['media_files']['thumb']) }}" />
             </a>
+            {% if entry['title'] %}
+              <br />
+              <a href="{{ entry_url }}">{{ entry['title'] }}</a>
+            {% endif %}
           </td>
         {% endfor %}
       </tr>