From e7a93361e39e495ea89b2d58b48dac7d722c5ad4 Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Sat, 14 Dec 2024 16:41:18 -0300 Subject: [PATCH] help icon added and new icon on add button --- admin/templates/states_panel.html | 6 +++--- admin/views.py | 5 +++-- dashboard/templates/base.html | 21 ++++++++++++++++++--- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/admin/templates/states_panel.html b/admin/templates/states_panel.html index c7a4d36..c3ca7c8 100644 --- a/admin/templates/states_panel.html +++ b/admin/templates/states_panel.html @@ -8,14 +8,14 @@
-
+
-

{% trans "State Definitions" %}

{% if state_definitions %} diff --git a/admin/views.py b/admin/views.py index f24a90f..df36e9e 100644 --- a/admin/views.py +++ b/admin/views.py @@ -139,14 +139,15 @@ class StateDefinitionContextMixin(ContextMixin): context = super().get_context_data(**kwargs) context.update({ "state_definitions": StateDefinition.objects.filter(institution=self.request.user.institution).order_by('order'), + "help_text": _('State definitions are the custom finite states that a device can be in.'), }) return context class StatesPanelView(AdminView, StateDefinitionContextMixin, TemplateView): template_name = "states_panel.html" - title = _("States") - breadcrumb = _("admin / States") + " /" + title = _("States Panel") + breadcrumb = _("admin / States Panel") + " /" class AddStateDefinitionView(AdminView, StateDefinitionContextMixin, CreateView): diff --git a/dashboard/templates/base.html b/dashboard/templates/base.html index 49a9550..027a07d 100644 --- a/dashboard/templates/base.html +++ b/dashboard/templates/base.html @@ -184,9 +184,15 @@ {% endfor %} {% endblock messages %}
-

{{ title }}

- -
+

{{ title }} + {% if help_text %} + + + + {% endif %} +

+ + {% csrf_token %}
@@ -227,4 +233,13 @@ {% block extrascript %}{% endblock %} {% endblock %} + + +
{% trans 'Move and drag state definitions to reorder' %}