From e58f514896c42ee77097b68fe3701742ab42a690 Mon Sep 17 00:00:00 2001 From: Craig Williams Date: Mon, 21 Feb 2022 16:13:28 +0000 Subject: [PATCH] Use blockier-templates --- templates/forms/organisation.html.twig | 10 + templates/pages/organisation.html.twig | 3 +- .../tables/deleted-organisations.html.twig | 125 ++++------- templates/tables/organisations.html.twig | 42 +++- templates/tables/users.html.twig | 195 ++++++------------ 5 files changed, 148 insertions(+), 227 deletions(-) diff --git a/templates/forms/organisation.html.twig b/templates/forms/organisation.html.twig index 99b5e58..9a9cef2 100644 --- a/templates/forms/organisation.html.twig +++ b/templates/forms/organisation.html.twig @@ -4,6 +4,7 @@
{% block organisation_form %} + {% block organisation_field_name %} {% if 'name' not in form.fields.hidden %}
@@ -15,6 +16,9 @@
{% endif %} + {% endblock %} + + {% block organisation_field_slug %} {% if 'slug' not in form.fields.hidden %}
@@ -35,6 +39,9 @@ {% else %} {% endif %} + {% endblock %} + + {% block organisation_field_description %} {% if 'description' not in form.fields.hidden %}
@@ -43,15 +50,18 @@
{% endif %} + {% endblock %} {% endblock %}

+ {% block organisation_form_buttons %}
+ {% endblock %}
diff --git a/templates/pages/organisation.html.twig b/templates/pages/organisation.html.twig index 14d6fdd..9555b26 100644 --- a/templates/pages/organisation.html.twig +++ b/templates/pages/organisation.html.twig @@ -1,4 +1,4 @@ -{% extends "pages/abstract/dashboard.html.twig" %} +{% extends "@blockier-templates/pages/abstract/dashboard.html.twig" %} {% block stylesheets_page %} @@ -133,6 +133,7 @@
{% endblock %} + {% block scripts_page %} - - - - - - - - - - - {% endverbatim %} +{% block table_cell_template_info %} +{% verbatim %} + +{% endverbatim %} {% endblock %} + +{% block table_cell_template_actions %} +{% verbatim %} + +{% endverbatim %} +{% endblock %} + +{% block table_cell_template_join %}{% endblock %} \ No newline at end of file diff --git a/templates/tables/organisations.html.twig b/templates/tables/organisations.html.twig index f8129c3..f5b4fa8 100644 --- a/templates/tables/organisations.html.twig +++ b/templates/tables/organisations.html.twig @@ -28,12 +28,7 @@ {% endblock %} {% block table_cell_templates %} - {# This contains a series of + {% endverbatim %} + {% endblock %} + {% block table_cell_template_description %} + {% verbatim %} + {% endverbatim %} + {% endblock %} + {% block table_cell_template_status %} + {% verbatim %} + {% endverbatim %} + {% endblock %} + {% block table_cell_template_memberCount %} + {% verbatim %} + {% endverbatim %} + {% endblock %} + {% block table_cell_template_adminCount %} + {% verbatim %} + {% endverbatim %} + {% endblock %} + {% block table_cell_template_join %} + {% verbatim %} + {% endverbatim %} + {% endblock %} - {% endverbatim %}{% if hasRole('site-admin') or hasRole('organisations-admin') %}{% verbatim %} + {% block table_cell_template_actions %} + {% if hasRole('site-admin') or hasRole('organisations-admin') %} + {% verbatim %} - {% endverbatim %}{% else %}{% verbatim %} + {% endverbatim %} + {% else %} + {% verbatim %} - {% endverbatim %}{% endif %}{% verbatim %} {% endverbatim %} + {% endif %} + {% endblock %} + + {% block table_cell_template_extra %}{% endblock %} {% endblock %} diff --git a/templates/tables/users.html.twig b/templates/tables/users.html.twig index 8cd7d5b..1d92f74 100644 --- a/templates/tables/users.html.twig +++ b/templates/tables/users.html.twig @@ -1,11 +1,4 @@ -{# This partial template renders a table of users, to be populated with rows via an AJAX request. - # This extends a generic template for paginated tables. - # - # Note that this template contains a "skeleton" table with an empty table body, and then a block of Handlebars templates which are used - # to render the table cells with the data from the AJAX request. -#} - -{% extends "tables/table-paginated.html.twig" %} +{% extends "@blockier-templates/tables/users.html.twig" %} {% block table %} @@ -28,26 +21,67 @@
{% endblock %} -{% block table_cell_templates %} - {# This contains a series of +{% block table_cell_template_actions %} +{% verbatim %} + +{% endverbatim %} +{% endblock %} + +{% block table_cell_template_extra %} + {% block table_cell_template_organisations %} + {% verbatim %} - - - - - - - - {% endverbatim %} + {% endblock %} {% endblock %} +