From f17adbb2ed2a0f217a58fae8cb575b74987c48fe Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Wed, 2 Mar 2022 13:11:57 +0100 Subject: [PATCH] Show private photos count in gallery --- photologue/templates/photologue/gallery_detail.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/photologue/templates/photologue/gallery_detail.html b/photologue/templates/photologue/gallery_detail.html index 3561932..35d3538 100644 --- a/photologue/templates/photologue/gallery_detail.html +++ b/photologue/templates/photologue/gallery_detail.html @@ -40,6 +40,7 @@ SPDX-License-Identifier: GPL-3.0-or-later {% endif %} {% if gallery.date_start %}

{{ gallery.date_start }}{% if gallery.date_end and gallery.date_end != gallery.date_start %} {% trans "to" %} {{ gallery.date_end }}{% endif %}

{% endif %} +{% if request.user.is_staff and gallery.photo_private_count %}

{{ gallery.photo_private_count }} photos censurées

{% endif %} {% if gallery.tags.all %}

Tags : {% for tag in gallery.tags.all %} @@ -71,7 +72,7 @@ SPDX-License-Identifier: GPL-3.0-or-later

{% for photo in photos %} - {{ photo.title }}{% if photo.date_taken %} - {{ photo.date_taken|date }} {{ photo.date_taken|time }}{% endif %} - {{ photo.owner.get_full_name }}{% if photo.license %} - {{ photo.license }}{% endif %} + {{ gallery.title }} - {{ photo.title }}{% if photo.date_taken %} - {{ photo.date_taken|date }} {{ photo.date_taken|time }}{% endif %}{% if photo.owner.get_full_name %} - {{ photo.owner.get_full_name }}{% else %} - {{ photo.owner.username }}{% endif %}{% if photo.license %} - {{ photo.license }}{% endif %}{% if not photo.is_public %} - !PRIVATE!{% endif %} {% endfor %}