summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-14 17:24:23 +0100
committerJavier Sánchez Parra <jsanchez@soleta.eu>2022-03-14 17:24:23 +0100
commit57ab7c11a90f6d4b9a2d54d5590aad88ae7a133f (patch)
treebdde3a47818be37071f41931b2ca786a3c9b3fe2
parentfeed13555454335355063f6b06dd9f035c5369ae (diff)
Add back button to all actions
Add a back button to facilitate users to return to the previous page.
-rw-r--r--ogcp/templates/actions/add_center.html1
-rw-r--r--ogcp/templates/actions/add_room.html1
-rw-r--r--ogcp/templates/actions/client_details.html1
-rw-r--r--ogcp/templates/actions/delete_center.html1
-rw-r--r--ogcp/templates/actions/delete_client.html1
-rw-r--r--ogcp/templates/actions/delete_image.html1
-rw-r--r--ogcp/templates/actions/delete_room.html1
-rw-r--r--ogcp/templates/actions/hardware.html1
-rw-r--r--ogcp/templates/actions/image_create.html1
-rw-r--r--ogcp/templates/actions/image_details.html2
-rw-r--r--ogcp/templates/actions/image_restore.html1
-rw-r--r--ogcp/templates/actions/mode.html1
-rw-r--r--ogcp/templates/actions/oglive.html1
-rw-r--r--ogcp/templates/actions/poweroff.html1
-rw-r--r--ogcp/templates/actions/reboot.html1
-rw-r--r--ogcp/templates/actions/session.html1
-rw-r--r--ogcp/templates/actions/setup.html1
-rw-r--r--ogcp/templates/actions/software.html1
-rw-r--r--ogcp/templates/actions/software_list.html1
-rw-r--r--ogcp/templates/actions/wol.html1
-rw-r--r--ogcp/templates/commands.html6
-rw-r--r--ogcp/templates/images.html5
-rw-r--r--ogcp/templates/scopes.html5
23 files changed, 37 insertions, 0 deletions
diff --git a/ogcp/templates/actions/add_center.html b/ogcp/templates/actions/add_center.html
index 53fbdc0..1822639 100644
--- a/ogcp/templates/actions/add_center.html
+++ b/ogcp/templates/actions/add_center.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_center %} active{% endblock %}
{% block nav_center_add %} active{% endblock %}
diff --git a/ogcp/templates/actions/add_room.html b/ogcp/templates/actions/add_room.html
index 7ccf086..d71261d 100644
--- a/ogcp/templates/actions/add_room.html
+++ b/ogcp/templates/actions/add_room.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_room %} active{% endblock %}
{% block nav_room_add %} active{% endblock %}
diff --git a/ogcp/templates/actions/client_details.html b/ogcp/templates/actions/client_details.html
index f6c2fd1..8d869f8 100644
--- a/ogcp/templates/actions/client_details.html
+++ b/ogcp/templates/actions/client_details.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_client %} active{% endblock %}
{% block nav_client_details %} active{% endblock %}
diff --git a/ogcp/templates/actions/delete_center.html b/ogcp/templates/actions/delete_center.html
index ddb6114..6fef1f6 100644
--- a/ogcp/templates/actions/delete_center.html
+++ b/ogcp/templates/actions/delete_center.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_center %} active{% endblock %}
{% block nav_center_delete %} active{% endblock %}
diff --git a/ogcp/templates/actions/delete_client.html b/ogcp/templates/actions/delete_client.html
index 80e91c7..1a44eb2 100644
--- a/ogcp/templates/actions/delete_client.html
+++ b/ogcp/templates/actions/delete_client.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_client %} active{% endblock %}
{% block nav_client_delete %} active{% endblock %}
diff --git a/ogcp/templates/actions/delete_image.html b/ogcp/templates/actions/delete_image.html
index 83cbc41..4f3c436 100644
--- a/ogcp/templates/actions/delete_image.html
+++ b/ogcp/templates/actions/delete_image.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block content %}
diff --git a/ogcp/templates/actions/delete_room.html b/ogcp/templates/actions/delete_room.html
index 6dbb5fc..aa57368 100644
--- a/ogcp/templates/actions/delete_room.html
+++ b/ogcp/templates/actions/delete_room.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_room %} active{% endblock %}
{% block nav_room_delete %} active{% endblock %}
diff --git a/ogcp/templates/actions/hardware.html b/ogcp/templates/actions/hardware.html
index 87b3285..c4f9145 100644
--- a/ogcp/templates/actions/hardware.html
+++ b/ogcp/templates/actions/hardware.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_inventory %} active{% endblock %}
{% block nav_inventory_hardware %} active{% endblock %}
diff --git a/ogcp/templates/actions/image_create.html b/ogcp/templates/actions/image_create.html
index 1ea8690..4c8ac43 100644
--- a/ogcp/templates/actions/image_create.html
+++ b/ogcp/templates/actions/image_create.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_image %} active{% endblock %}
{% block nav_image_create %} active{% endblock %}
diff --git a/ogcp/templates/actions/image_details.html b/ogcp/templates/actions/image_details.html
index e54d3e8..b0677b7 100644
--- a/ogcp/templates/actions/image_details.html
+++ b/ogcp/templates/actions/image_details.html
@@ -1,6 +1,8 @@
{% extends 'images.html' %}
{% import "bootstrap/wtf.html" as wtf %}
+{% set btn_back = true %}
+
{% block content %}
<h1 class="m-5">{{_('Image details')}}</h1>
diff --git a/ogcp/templates/actions/image_restore.html b/ogcp/templates/actions/image_restore.html
index 03b0558..8a5d22e 100644
--- a/ogcp/templates/actions/image_restore.html
+++ b/ogcp/templates/actions/image_restore.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_image %} active{% endblock %}
{% block nav_image_restore %} active{% endblock %}
diff --git a/ogcp/templates/actions/mode.html b/ogcp/templates/actions/mode.html
index d4cb9de..44de8ac 100644
--- a/ogcp/templates/actions/mode.html
+++ b/ogcp/templates/actions/mode.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_setup %} active{% endblock %}
{% block nav_setup_set_bootmode %} active{% endblock %}
diff --git a/ogcp/templates/actions/oglive.html b/ogcp/templates/actions/oglive.html
index fc92218..9a4467f 100644
--- a/ogcp/templates/actions/oglive.html
+++ b/ogcp/templates/actions/oglive.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_setup %} active{% endblock %}
{% block nav_setup_set_oglive %} active{% endblock %}
diff --git a/ogcp/templates/actions/poweroff.html b/ogcp/templates/actions/poweroff.html
index 5a992c7..1d2d963 100644
--- a/ogcp/templates/actions/poweroff.html
+++ b/ogcp/templates/actions/poweroff.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_power %} active{% endblock %}
{% block nav_power_poweroff %} active{% endblock %}
diff --git a/ogcp/templates/actions/reboot.html b/ogcp/templates/actions/reboot.html
index 0dac1b7..882906d 100644
--- a/ogcp/templates/actions/reboot.html
+++ b/ogcp/templates/actions/reboot.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_power %} active{% endblock %}
{% block nav_power_reboot %} active{% endblock %}
diff --git a/ogcp/templates/actions/session.html b/ogcp/templates/actions/session.html
index 3e581a1..1e16a03 100644
--- a/ogcp/templates/actions/session.html
+++ b/ogcp/templates/actions/session.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_client %} active{% endblock %}
{% block nav_client_session %} active{% endblock %}
diff --git a/ogcp/templates/actions/setup.html b/ogcp/templates/actions/setup.html
index bad143d..559be84 100644
--- a/ogcp/templates/actions/setup.html
+++ b/ogcp/templates/actions/setup.html
@@ -1,6 +1,7 @@
{% extends 'commands.html' %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_setup %} active{% endblock %}
{% block nav_setup_setup %} active{% endblock %}
diff --git a/ogcp/templates/actions/software.html b/ogcp/templates/actions/software.html
index 253ea30..52a6a51 100644
--- a/ogcp/templates/actions/software.html
+++ b/ogcp/templates/actions/software.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_inventory %} active{% endblock %}
{% block nav_inventory_software %} active{% endblock %}
diff --git a/ogcp/templates/actions/software_list.html b/ogcp/templates/actions/software_list.html
index 3984be6..5b7c6cc 100644
--- a/ogcp/templates/actions/software_list.html
+++ b/ogcp/templates/actions/software_list.html
@@ -2,6 +2,7 @@
{% import "bootstrap/wtf.html" as wtf %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_inventory %} active{% endblock %}
{% block nav_inventory_software %} active{% endblock %}
diff --git a/ogcp/templates/actions/wol.html b/ogcp/templates/actions/wol.html
index b108adb..e93927b 100644
--- a/ogcp/templates/actions/wol.html
+++ b/ogcp/templates/actions/wol.html
@@ -3,6 +3,7 @@
{% import "macros.html" as macros %}
{% set sidebar_state = 'disabled' %}
+{% set btn_back = true %}
{% block nav_power %} active{% endblock %}
{% block nav_power_wol %} active{% endblock %}
diff --git a/ogcp/templates/commands.html b/ogcp/templates/commands.html
index 5298bcc..76dc191 100644
--- a/ogcp/templates/commands.html
+++ b/ogcp/templates/commands.html
@@ -94,6 +94,12 @@
form="scopesForm" formaction="{{ url_for('action_legacy_rt_log') }}" formmethod="get">
</div>
</div>
+
+ {% if btn_back %}
+ <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
+ {{ _("Back") }}
+ </button>
+ {% endif %}
{% endblock %}
{% block content %}
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index 2a67e58..7ef1efc 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -29,5 +29,10 @@
form="imagesForm" formaction="{{ url_for('action_image_info') }}" formmethod="get">
<input class="btn btn-light" type="submit" value="{{ _('Delete image') }}"
form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get">
+ {% if btn_back %}
+ <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
+ {{ _("Back") }}
+ </button>
+ {% endif %}
{% endblock %}
diff --git a/ogcp/templates/scopes.html b/ogcp/templates/scopes.html
index 08e0482..401a40b 100644
--- a/ogcp/templates/scopes.html
+++ b/ogcp/templates/scopes.html
@@ -49,6 +49,11 @@
form="scopesForm" formaction="{{ url_for('action_center_delete') }}" formmethod="get">
</div>
</div>
+ {% if btn_back %}
+ <button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
+ {{ _("Back") }}
+ </button>
+ {% endif %}
{% endblock %}
{% block content %}