projects
/
mediagoblin.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify/Robustify the thumbnail URL usage in templates
[mediagoblin.git]
/
mediagoblin
/
templates
/
mediagoblin
/
utils
/
object_gallery.html
diff --git
a/mediagoblin/templates/mediagoblin/utils/object_gallery.html
b/mediagoblin/templates/mediagoblin/utils/object_gallery.html
index b451946d601de888d53673efb1ca1acffa176ad4..b4da5bc111bea12f9269fffcc871c93dbeb2532e 100644
(file)
--- a/
mediagoblin/templates/mediagoblin/utils/object_gallery.html
+++ b/
mediagoblin/templates/mediagoblin/utils/object_gallery.html
@@
-1,6
+1,6
@@
{#
# GNU MediaGoblin -- federated, autonomous media hosting
{#
# GNU MediaGoblin -- federated, autonomous media hosting
-# Copyright (C) 2011
Free Software Foundation, Inc
+# Copyright (C) 2011
, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@@
-25,13
+25,16
@@
{%- if loop.first %} thumb_row_first
{%- elif loop.last %} thumb_row_last{% endif %}">
{% for entry in row %}
{%- 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 %}">
<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) }}">
- <img src="{{ request.app.public_store.file_url(
- entry['media_files']['thumb']) }}" />
+ <a href="{{ entry_url }}">
+ <img src="{{ entry.thumb_url }}" />
</a>
</a>
+ {% if entry.title %}
+ <a class="thumb_entry_title" href="{{ entry_url }}">{{ entry.title }}</a>
+ {% endif %}
</td>
{% endfor %}
</tr>
</td>
{% endfor %}
</tr>
@@
-63,7
+66,11
@@
{% endif %}
{% else %}
<p>
{% endif %}
{% else %}
<p>
- <i>There doesn't seem to be any media here yet...</i>
+ <i>
+ {%- trans -%}
+ There doesn't seem to be any media here yet...
+ {%- endtrans -%}
+ </i>
</p>
{% endif %}
{% endmacro %}
</p>
{% endif %}
{% endmacro %}