summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/actions/folder_delete.html29
-rw-r--r--ogcp/templates/macros.html6
-rw-r--r--ogcp/templates/scopes.html2
3 files changed, 37 insertions, 0 deletions
diff --git a/ogcp/templates/actions/folder_delete.html b/ogcp/templates/actions/folder_delete.html
new file mode 100644
index 0000000..78fc136
--- /dev/null
+++ b/ogcp/templates/actions/folder_delete.html
@@ -0,0 +1,29 @@
+{% extends 'scopes.html' %}
+{% import "bootstrap/wtf.html" as wtf %}
+
+{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
+
+{% block nav_folder %} active{% endblock %}
+{% block nav_folder_delete %} active{% endblock %}
+{% block content %}
+
+<h1 class="m-5">{{_('Delete folder')}}</h1>
+
+<table class="table">
+ <tbody>
+ {% for content in folder_content %}
+ <tr>
+ <th scope="row">{{ content['type'] }}</th>
+ <td>{{ content['name'] }}</td>
+ </tr>
+ {% endfor %}
+ </tbody>
+</table>
+
+{{ wtf.quick_form(form,
+ method='post',
+ button_map={'submit': 'danger'},
+ extra_classes="mx-5") }}
+
+{% endblock %}
diff --git a/ogcp/templates/macros.html b/ogcp/templates/macros.html
index fb7c311..e78cb5b 100644
--- a/ogcp/templates/macros.html
+++ b/ogcp/templates/macros.html
@@ -47,6 +47,12 @@
{% if state %}style="filter: grayscale(100%);" onclick="return false;"{% endif %}
{% if scope.get("selected", False) %}checked{% endif %}
name="scope-room" />
+ {% elif scope["type"] == "folder" %}
+ <input class="form-check-input" type="checkbox" form="scopesForm"
+ value="{{ scope["id"] }}"
+ {% if state %}style="filter: grayscale(100%);" onclick="return false;"{% endif %}
+ {% if scope.get("selected", False) %}checked{% endif %}
+ name="folder" />
{% elif " ".join(scope["ip"]) %}
<input class="form-check-input" type="checkbox" form="scopesForm"
value="{{ " ".join(scope["ip"]) }}" data-parent-room="{{ parent_room }}"
diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html
index ecc8433..23b3d3c 100644
--- a/ogcp/templates/scopes.html
+++ b/ogcp/templates/scopes.html
@@ -64,6 +64,8 @@
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<input class="btn btn-light dropdown-item {% block nav_folder_add %}{% endblock %}" type="submit" value="{{ _('Add folder') }}"
form="scopesForm" formaction="{{ url_for('action_folder_add') }}" formmethod="get">
+ <input class="btn btn-light dropdown-item {% block nav_folder_delete %}{% endblock %}" type="submit" value="{{ _('Delete folder') }}"
+ form="scopesForm" formaction="{{ url_for('action_folder_delete') }}" formmethod="get">
</div>
</div>