From 57ab7c11a90f6d4b9a2d54d5590aad88ae7a133f Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Mon, 14 Mar 2022 17:24:23 +0100 Subject: Add back button to all actions Add a back button to facilitate users to return to the previous page. --- ogcp/templates/actions/add_center.html | 1 + ogcp/templates/actions/add_room.html | 1 + ogcp/templates/actions/client_details.html | 1 + ogcp/templates/actions/delete_center.html | 1 + ogcp/templates/actions/delete_client.html | 1 + ogcp/templates/actions/delete_image.html | 1 + ogcp/templates/actions/delete_room.html | 1 + ogcp/templates/actions/hardware.html | 1 + ogcp/templates/actions/image_create.html | 1 + ogcp/templates/actions/image_details.html | 2 ++ ogcp/templates/actions/image_restore.html | 1 + ogcp/templates/actions/mode.html | 1 + ogcp/templates/actions/oglive.html | 1 + ogcp/templates/actions/poweroff.html | 1 + ogcp/templates/actions/reboot.html | 1 + ogcp/templates/actions/session.html | 1 + ogcp/templates/actions/setup.html | 1 + ogcp/templates/actions/software.html | 1 + ogcp/templates/actions/software_list.html | 1 + ogcp/templates/actions/wol.html | 1 + ogcp/templates/commands.html | 6 ++++++ ogcp/templates/images.html | 5 +++++ ogcp/templates/scopes.html | 5 +++++ 23 files changed, 37 insertions(+) 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 %}

{{_('Image details')}}

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"> + + {% if btn_back %} + + {% 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"> + {% if btn_back %} + + {% 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"> + {% if btn_back %} + + {% endif %} {% endblock %} {% block content %} -- cgit v1.2.3-18-g5258