Current location

narf Source control manager Git

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Mehani <shtrom+mediagoblin@ssji.net>2020-06-10 23:21:01 +1000
committerOlivier Mehani <shtrom+mediagoblin@ssji.net>2020-06-10 23:35:53 +1000
commit011b44ae171c89e1e827fe881a434b728ad2d820 (patch)
tree161a08bbd9c71c014eb4d7e44519d3fd3c2dab89
parentc4863bac7d8caa6eea9338daafea5507b5923547 (diff)
Re-show note on gallery media grids5619-modern-gallery
Signed-off-by: Olivier Mehani <shtrom+mediagoblin@ssji.net>
-rw-r--r--mediagoblin/templates/mediagoblin/utils/collection_gallery.html2
-rw-r--r--mediagoblin/templates/mediagoblin/utils/media_grid.html12
2 files changed, 10 insertions, 4 deletions
diff --git a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html
index 4a90878d..c05d7389 100644
--- a/mediagoblin/templates/mediagoblin/utils/collection_gallery.html
+++ b/mediagoblin/templates/mediagoblin/utils/collection_gallery.html
@@ -34,7 +34,7 @@
collection=item.in_collection.slug,
collection_item=item.id) -%}
{% endif %}
- {{ media_entry(request, obj, loop, remove_url) }}
+ {{ media_entry(request, obj, loop, remove_url, item.note) }}
{% endfor %}
{% endfor %}
</div>
diff --git a/mediagoblin/templates/mediagoblin/utils/media_grid.html b/mediagoblin/templates/mediagoblin/utils/media_grid.html
index ec8d66b3..50087a5d 100644
--- a/mediagoblin/templates/mediagoblin/utils/media_grid.html
+++ b/mediagoblin/templates/mediagoblin/utils/media_grid.html
@@ -16,7 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
-{% macro media_entry(request, entry, loop, remove_url=None) %}
+{% macro media_entry(request, entry, loop, remove_url=None, note=None) %}
{% set entry_url = entry.url_for_self(request.urlgen) %}
<div class="media_thumbnail thumb_entry
{%- if loop.first %} thumb_entry_first
@@ -36,8 +36,14 @@
{%- trans %}(remove){% endtrans -%}
</a>
{% endif %}
- {% if entry.title %}
- <a class="thumb_entry_title" href="{{ entry_url }}">{{ entry.title }}</a>
+ {% if entry.title or note %}
+ <a class="thumb_entry_title" href="{{ entry_url }}">
+ {%- if entry.title -%}
+ {{ entry.title }}
+ {%- endif %} {% if note -%}
+ ({{ note }})
+ {%- endif -%}
+ </a>
{% endif %}
</div>
{%- endmacro %}