From 6153ca426f9f880c70564ecb2d5346d64c2802eb Mon Sep 17 00:00:00 2001 From: Javier Hernandez Date: Mon, 5 Feb 2024 10:48:12 +0100 Subject: improve delete confirmation Make delete confirmations show information in a manner that is easier to read. This includes delete confirmations for centers, room and folder. Messages are now more clear. Also, content table shows the type of the items (folder, room, etc.) --- ogcp/templates/actions/delete_center.html | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'ogcp/templates/actions/delete_center.html') diff --git a/ogcp/templates/actions/delete_center.html b/ogcp/templates/actions/delete_center.html index af89364..5379a58 100644 --- a/ogcp/templates/actions/delete_center.html +++ b/ogcp/templates/actions/delete_center.html @@ -9,12 +9,11 @@ {% block content %}

{{_('Delete center')}}

-{% if children %} -

The following items will be deleted

+

The following center and its content will be deleted

- -{% for c in children %} - - - -{% endfor %} +{% if children %} + {% for type, elements in children.items() %} + + + + + {% endfor %} +{% else %} + +{% endif %}
+ {% for x in ancestors %} {{x}} {% if not loop.last %} @@ -25,19 +24,22 @@
- {% if c['type'] == 'folder' %} - 📁 - {% endif %} - {{c['name']}} -
{{ type }} + {% for e in elements %} + {{e}} + {% endfor %} +
This center is empty
-{% endif %} {{ wtf.quick_form(form, action=url_for('action_center_delete'), -- cgit v1.2.3-18-g5258