From 0d1449716fce6fc08b2c8494806f0b7e50821e6a Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Fri, 25 Oct 2024 19:28:50 +0000 Subject: [PATCH] Cleanup trigger list template --- templates/triggers/trigger_list.html | 184 ++++++++++++--------------- 1 file changed, 84 insertions(+), 100 deletions(-) diff --git a/templates/triggers/trigger_list.html b/templates/triggers/trigger_list.html index 70cdefcd31..d76615c342 100644 --- a/templates/triggers/trigger_list.html +++ b/templates/triggers/trigger_list.html @@ -1,107 +1,91 @@ -{% extends "smartmin/list.html" %} -{% load smartmin sms temba compress humanize i18n %} +{% extends "orgs/base/list.html" %} +{% load smartmin temba i18n %} -{% block content %} -
- {% block pjax %} - -
- {% blocktrans trimmed with count=paginator.count %} - Are you sure you want to delete all {{ count }} archived triggers? This cannot be undone. +{% block modaxes %} + + + +
+ {% blocktrans trimmed with count=paginator.count %} + Are you sure you want to delete all {{ count }} archived triggers? This cannot be undone. + {% endblocktrans %} + {% if paginator.count > 50 %} +
+
+ {% blocktrans trimmed %} + This operation can take a while to complete. Triggers may remain in this view during the process. {% endblocktrans %} - {% if paginator.count > 50 %} -
-
- {% blocktrans trimmed %} - This operation can take a while to complete. Triggers may remain in this view during the process. - {% endblocktrans %} - {% endif %} -
-
- -
{% trans "Are you sure you want to delete the selected triggers? This cannot be undone." %}
-
- {% endblock pjax %} -
- - - -
-
- {% include "includes/short_pagination.html" %} - {% if paginator.is_es_search and not page_obj.has_next_page and page_obj.number == paginator.num_pages and paginator.count > 10000 %} -
{% trans "To view more than 10,000 search results, save it as a group." %}
- {% endif %} -
-
- - - {% for obj in object_list %} - - {% if org_perms.triggers.trigger_update %} - - {% endif %} - + + + {% empty %} + + + + {% endfor %} + +
- - - -
-
-
- - -
-
- {% with "triggers/types/"|add:obj.type.slug|add:"/desc.html" as type_template %} - {% include type_template with trigger=obj %} - {% endwith %} -
-
- {% if obj.channel or obj.contacts.all or obj.groups.all or obj.exclude_groups.all %} -
- {% if obj.channel %} - {# djlint:off #} - {{ obj.channel }} - {# djlint:on #} - {% endif %} - {% include "includes/recipients.html" with contacts=obj.contacts.all groups=obj.groups.all exclude_groups=obj.exclude_groups.all groups_as_filters=True %} -
- {% endif %} -
+ {% endif %} + + + +
{% trans "Are you sure you want to delete the selected triggers? This cannot be undone." %}
+
+{% endblock modaxes %} +{% block table %} + + + {% for obj in object_list %} + + {% if org_perms.triggers.trigger_update %} + - - - {% empty %} - - - - {% endfor %} - - {% block extra-rows %} - {% endblock extra-rows %} -
+ + - +
+
+
+ + +
+
+ {% with "triggers/types/"|add:obj.type.slug|add:"/desc.html" as type_template %} + {% include type_template with trigger=obj %} + {% endwith %} +
-
{% trans "No triggers" %}
- - - -{% endblock content %} + {% if obj.channel or obj.contacts.all or obj.groups.all or obj.exclude_groups.all %} +
+ {% if obj.channel %} + {# djlint:off #} + {{ obj.channel }} + {# djlint:on #} + {% endif %} + {% include "includes/recipients.html" with contacts=obj.contacts.all groups=obj.groups.all exclude_groups=obj.exclude_groups.all groups_as_filters=True %} +
+ {% endif %} + +
+ +
{% trans "No triggers" %}
+{% endblock table %} {% block extra-script %} {{ block.super }}