From edd23982a46174d1d8fb9fc69b3f7526a15e38b5 Mon Sep 17 00:00:00 2001 From: Helge Jung <hej@c3pb.de> Date: Sat, 23 Sep 2023 11:13:33 +0200 Subject: [PATCH] backoffice/staticpages: show privacy+protection in list --- src/backoffice/templates/backoffice/staticpage_detail.html | 2 +- src/backoffice/templates/backoffice/staticpage_list.html | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/backoffice/templates/backoffice/staticpage_detail.html b/src/backoffice/templates/backoffice/staticpage_detail.html index c2fd9e739..20ac291cd 100644 --- a/src/backoffice/templates/backoffice/staticpage_detail.html +++ b/src/backoffice/templates/backoffice/staticpage_detail.html @@ -13,7 +13,7 @@ {% csrf_token %} <div class="card"> - <div class="card-header">{% trans 'StaticPage' %} {{ object.pk }}</div> + <div class="card-header">{% trans 'StaticPage' %} "{{ object.slug }}"</div> <div class="card-body"> <p>Revision: <strong>{{ object.newest_revision.revision }}</strong>{% if object.newest_revision.revision != object.public_version %} (public: {{ object.public_revision }}){% endif %}</p> {% if form.errors %} diff --git a/src/backoffice/templates/backoffice/staticpage_list.html b/src/backoffice/templates/backoffice/staticpage_list.html index 9825e896b..21bc6efe5 100644 --- a/src/backoffice/templates/backoffice/staticpage_list.html +++ b/src/backoffice/templates/backoffice/staticpage_list.html @@ -15,6 +15,8 @@ <th>{% trans "StaticPage__slug" %}</th> <th>{% trans "StaticPage__title" %}</th> <th>{% trans "StaticPage__language" %}</th> + <th>{% trans "StaticPage__privacy" %}</th> + <th>{% trans "StaticPage__protection" %}</th> <th>{% trans "StaticPage__last_edited_by" %}</th> <th>{% trans "StaticPage__last_edited_at" %}</th> </tr> @@ -25,6 +27,8 @@ <td><a href="{% url 'backoffice:page-detail' pk=page.pk %}">{{ page.slug }}</a></td> <td>{{ page.title }}</td> <td>{{ page.language }}</td> + <td title="{{ page.get_privacy_display }}">{% if page.privacy == page.Privacy.NONE %}👁{% elif page.privacy == page.Privacy.CONFERENCE %}🎪{% elif page.privacy == page.Privacy.PERM %}⚙{% else %}?{% endif %}</td> + <td title="{{ page.get_protection_display }}">{% if page.protection == page.Protection.NONE %}👁{% elif page.protection == page.Protection.PERM %}⚙{% else %}?{% endif %}</td> <td>{{ page.last_revision_details.author | default:"-" }}</td> <td>{{ page.last_revision_details.timestamp | date:"DATETIME_FORMAT" }}</td> </tr> -- GitLab