From 69b7fbaa07131a5895419eccc999119205b24c20 Mon Sep 17 00:00:00 2001 From: Michael Collins <15347726+michaeljcollinsuk@users.noreply.github.com> Date: Wed, 18 Oct 2023 09:49:31 +0100 Subject: [PATCH] Update datasource detail template to improve display when bucket deleted --- controlpanel/frontend/jinja2/datasource-detail.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/controlpanel/frontend/jinja2/datasource-detail.html b/controlpanel/frontend/jinja2/datasource-detail.html index 24c34a158..82106174a 100644 --- a/controlpanel/frontend/jinja2/datasource-detail.html +++ b/controlpanel/frontend/jinja2/datasource-detail.html @@ -38,7 +38,7 @@

{{ page_title }}

-

Users and groups with access

+

Users and groups with{% if bucket.is_deleted %} revoked{% endif %} access

@@ -85,11 +85,13 @@

Users and groups with access

{% endfor %} + + {% set plural = access_list|length > 1 %} @@ -224,8 +226,7 @@

Data access log

{% endif %} - -{% if request.user.has_perm('api.destroy_s3bucket', bucket) %} +{% if not bucket.is_deleted and request.user.has_perm('api.destroy_s3bucket', bucket) %}
{{ csrf_input }}
{{ access_list|length }} - user{%- if access_list|length != 1 -%}s{% endif %} or group{%- if access_list|length != 1 -%}s have{% else %} has{% endif %} + user{%- if plural -%}s{% endif %} or group{%- if plural -%}s{% endif %}{% if bucket.is_deleted %} had{% elif plural %} have{% else %} has{% endif %} access to this {{ datasource_type }} data source