summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-03 11:11:23 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-03 11:41:16 +0100
commit4005b019ee013c223a6ca3b31dd8fb7799c838d1 (patch)
tree977b0ff98eaf2c0f9395a33c840ebfd53a8f8aa1
parent3db3659499e7e59aa92a0103ec6bc6050cef5a4a (diff)
Extend scopes or commands in client details
Both "Add client" and "Client details" views use client_details.html template. With this commit, "Add client" extends scopes.html and "Client details" extend commands.hmlt.
-rw-r--r--ogcp/templates/actions/client_details.html2
-rw-r--r--ogcp/views.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/ogcp/templates/actions/client_details.html b/ogcp/templates/actions/client_details.html
index 34dea36..102f333 100644
--- a/ogcp/templates/actions/client_details.html
+++ b/ogcp/templates/actions/client_details.html
@@ -1,4 +1,4 @@
-{% extends 'commands.html' %}
+{% extends parent %}
{% import "bootstrap/wtf.html" as wtf %}
{% block content %}
diff --git a/ogcp/views.py b/ogcp/views.py
index c993350..d4c74a1 100644
--- a/ogcp/views.py
+++ b/ogcp/views.py
@@ -640,7 +640,7 @@ def action_client_info():
scopes, clients = get_scopes(set(ips))
return render_template('actions/client_details.html', form=form,
- scopes=scopes, setup=setup)
+ parent="commands.html", scopes=scopes, setup=setup)
@app.route('/action/client/add', methods=['GET', 'POST'])
@login_required
@@ -679,7 +679,9 @@ def action_client_add():
form.room.choices = list(rooms)
form.create.render_kw = {"formaction": url_for('action_client_add')}
- return render_template('actions/client_details.html', form=form)
+ scopes, clients = get_scopes()
+ return render_template('actions/client_details.html', form=form,
+ parent="scopes.html", scopes=scopes)
def get_selected_clients(scopes):
selected_clients = dict()