diff options
author | Javier Hernandez <jhernandez@soleta.eu> | 2024-02-05 10:48:12 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2024-02-05 11:48:35 +0100 |
commit | 6153ca426f9f880c70564ecb2d5346d64c2802eb (patch) | |
tree | b132e076715caf0ecd46aba52672cb4e808a999c /ogcp/templates/actions/delete_center.html | |
parent | 6a134b63372311706f174516a45ad2af8c7ff225 (diff) |
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.)
Diffstat (limited to 'ogcp/templates/actions/delete_center.html')
-rw-r--r-- | ogcp/templates/actions/delete_center.html | 30 |
1 files changed, 16 insertions, 14 deletions
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 %} <h1 class="m-5">{{_('Delete center')}}</h1> -{% if children %} -<p class="text-left mx-5">The following items will be deleted</p> +<p class="text-left mx-5">The following center and its content will be deleted</p> <table class="table table-hover mx-5"> <thead class="thead-light"> <tr> -<th> +<th colspan="2"> {% for x in ancestors %} {{x}} {% if not loop.last %} @@ -25,19 +24,22 @@ </tr> </thead> <tbody class="text-left"> -{% for c in children %} - <tr> - <td> - {% if c['type'] == 'folder' %} - 📁 - {% endif %} - {{c['name']}} - </td> - </tr> -{% endfor %} +{% if children %} + {% for type, elements in children.items() %} + <tr> + <th>{{ type }}</th> + <td> + {% for e in elements %} + {{e}} + {% endfor %} + </td> + </tr> + {% endfor %} +{% else %} + <tr><td>This center is empty</td></tr> +{% endif %} </tbody> </table> -{% endif %} {{ wtf.quick_form(form, action=url_for('action_center_delete'), |