summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/actions
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates/actions')
-rw-r--r--ogcp/templates/actions/delete_center.html30
-rw-r--r--ogcp/templates/actions/delete_room.html18
-rw-r--r--ogcp/templates/actions/folder_delete.html30
3 files changed, 43 insertions, 35 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' %}
- &#x1F4C1;
- {% 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'),
diff --git a/ogcp/templates/actions/delete_room.html b/ogcp/templates/actions/delete_room.html
index 3fa24cf..b4c3601 100644
--- a/ogcp/templates/actions/delete_room.html
+++ b/ogcp/templates/actions/delete_room.html
@@ -11,11 +11,11 @@
<h1 class="m-5">{{_('Delete room')}}</h1>
{% if children %}
-<p class="text-left mx-5">The following items will be deleted</p>
+<p class="text-left mx-5">The following room 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 %}
@@ -26,16 +26,20 @@
</tr>
</thead>
<tbody class="text-left">
-{% for c in children %}
+{% if children %}
+{% for type, elements in children.items() %}
<tr>
+ <th>{{ type }}</th>
<td>
- {% if c['type'] == 'folder' %}
- &#x1F4C1;
- {% endif %}
- {{c['name']}}
+ {% for e in elements %}
+ {{e}}
+ {% endfor %}
</td>
</tr>
{% endfor %}
+{% else %}
+ <tr><td>This room is empty</td></tr>
+{% endif %}
</tbody>
</table>
{% endif %}
diff --git a/ogcp/templates/actions/folder_delete.html b/ogcp/templates/actions/folder_delete.html
index 8d497e8..0f58026 100644
--- a/ogcp/templates/actions/folder_delete.html
+++ b/ogcp/templates/actions/folder_delete.html
@@ -10,12 +10,11 @@
<h1 class="m-5">{{_('Delete folder')}}</h1>
-{% if children %}
-<p class="text-left mx-5">The following items will be deleted</p>
+<p class="text-left mx-5">The following folder 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 %}
@@ -26,19 +25,22 @@
</tr>
</thead>
<tbody class="text-left">
-{% for c in children %}
- <tr>
- <td>
- {% if c['type'] == 'folder' %}
- &#x1F4C1;
- {% 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 folder is empty</td></tr>
+{% endif %}
</tbody>
</table>
-{% endif %}
{{ wtf.quick_form(form,
method='post',