From 409b3c6dce8e6df83ffe5373e40232242d173306 Mon Sep 17 00:00:00 2001 From: Rowan Seymour Date: Tue, 22 Oct 2024 22:38:34 +0000 Subject: [PATCH] Tweak base list template and convert invitation list page to use it too --- templates/flows/flow_list.html | 4 +- templates/globals/global_list.html | 4 +- templates/orgs/base/list.html | 16 ++++-- templates/orgs/invitation_list.html | 85 +++++++++++++--------------- templates/orgs/org_list.html | 4 +- templates/orgs/user_list.html | 4 +- templates/tickets/shortcut_list.html | 4 +- 7 files changed, 61 insertions(+), 60 deletions(-) diff --git a/templates/flows/flow_list.html b/templates/flows/flow_list.html index 194516361f..31dd1dd696 100644 --- a/templates/flows/flow_list.html +++ b/templates/flows/flow_list.html @@ -1,7 +1,7 @@ {% extends "orgs/base/list.html" %} {% load smartmin temba i18n humanize %} -{% block pre-table %} +{% block modaxes %} -{% endblock pre-table %} +{% endblock modaxes %} {% block table %} {% if object_list %} diff --git a/templates/globals/global_list.html b/templates/globals/global_list.html index d49cdb9eb1..9c24ecd6a9 100644 --- a/templates/globals/global_list.html +++ b/templates/globals/global_list.html @@ -1,13 +1,15 @@ {% extends "orgs/base/list.html" %} {% load smartmin temba i18n humanize %} -{% block pre-table %} +{% block modaxes %} +{% endblock modaxes %} +{% block pre-table %}
{% blocktrans trimmed %} Globals are variables you can use across all of your flows but diff --git a/templates/orgs/base/list.html b/templates/orgs/base/list.html index 857f5b22d6..138e62d05f 100644 --- a/templates/orgs/base/list.html +++ b/templates/orgs/base/list.html @@ -2,16 +2,20 @@ {% load i18n %} {% block content %} + {% block modaxes %} + {% endblock modaxes %} {% block pre-table %} {% endblock pre-table %} {% if view.search_fields %} -
- - - - + {% block search-form %} +
+ + + + + {% endblock search-form %} {% endif %} -
{% include "includes/short_pagination.html" %}
+
{% include "includes/short_pagination.html" %}
{% block table %} {% endblock table %} diff --git a/templates/orgs/invitation_list.html b/templates/orgs/invitation_list.html index bb554b4eee..d679f15b35 100644 --- a/templates/orgs/invitation_list.html +++ b/templates/orgs/invitation_list.html @@ -1,51 +1,50 @@ -{% extends "smartmin/list.html" %} +{% extends "orgs/base/list.html" %} {% load smartmin temba i18n %} -{% block content %} +{% block modaxes %} + + +{% endblock modaxes %} +{% block pre-table %}
{% blocktrans trimmed with days=validity_days %} These are pending invitations to join your workspace. Invitations expire after {{ days }} days. {% endblocktrans %}
- {% block pre-table %} - - - {% endblock pre-table %} -
{% include "includes/short_pagination.html" %}
-
-
- +{% endblock pre-table %} +{% block table %} +
+ + + + + + + + + + {% for obj in object_list %} - - - - + + + + - - - {% for obj in object_list %} - - - - - - - {% empty %} - - - - {% endfor %} - -
{% trans "Email" %}{% trans "Role" %}{% trans "Sent On" %}
{% trans "Email" %}{% trans "Role" %}{% trans "Sent On" %}{{ obj.email }}{{ obj.role.display }}{{ obj.created_on|day }} + +
{{ obj.email }}{{ obj.role.display }}{{ obj.created_on|day }} - -
{% trans "No invitations" %}
- -{% endblock content %} + {% empty %} + + {% trans "No invitations" %} + + {% endfor %} + + +{% endblock table %} {% block extra-script %} {{ block.super }} {% endblock extra-script %} -{% block extra-style %} - {{ block.super }} - -{% endblock extra-style %} diff --git a/templates/orgs/org_list.html b/templates/orgs/org_list.html index 22752f44a0..a092eac07b 100644 --- a/templates/orgs/org_list.html +++ b/templates/orgs/org_list.html @@ -1,12 +1,12 @@ {% extends "orgs/base/list.html" %} {% load i18n temba smartmin humanize %} -{% block pre-table %} +{% block modaxes %} -{% endblock pre-table %} +{% endblock modaxes %} {% block table %} diff --git a/templates/orgs/user_list.html b/templates/orgs/user_list.html index 4831d7c63c..24eb0cc9fe 100644 --- a/templates/orgs/user_list.html +++ b/templates/orgs/user_list.html @@ -1,11 +1,13 @@ {% extends "orgs/base/list.html" %} {% load smartmin temba i18n %} -{% block pre-table %} +{% block modaxes %} +{% endblock modaxes %} +{% block pre-table %} {% if has_viewers %} {% blocktrans trimmed with cutoff="2024-12-31"|day %} diff --git a/templates/tickets/shortcut_list.html b/templates/tickets/shortcut_list.html index 3dec455018..cf021dd43b 100644 --- a/templates/tickets/shortcut_list.html +++ b/templates/tickets/shortcut_list.html @@ -1,11 +1,13 @@ {% extends "orgs/base/list.html" %} {% load smartmin temba i18n %} -{% block pre-table %} +{% block modaxes %} +{% endblock modaxes %} +{% block pre-table %}
{% blocktrans trimmed %} These are canned responses that agents can use to quickly reply to tickets.