From 0bdcd94e417da1f1a114dfc4ab981c5307994974 Mon Sep 17 00:00:00 2001 From: zerolab Date: Sat, 10 Feb 2024 23:16:35 +0000 Subject: [PATCH] Tidy up the modeladmin header --- .../wagtail_localize/modeladmin/includes/button.html | 3 ++- .../modeladmin/translatable_index.html | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/includes/button.html b/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/includes/button.html index f28691f82..141141828 100644 --- a/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/includes/button.html +++ b/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/includes/button.html @@ -1 +1,2 @@ -{{ button.label }} +{% load wagtailadmin_tags %} +{% if icon %}{% icon name=icon %} {% endif %}{{ button.label }} diff --git a/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/translatable_index.html b/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/translatable_index.html index 0b0167c3a..1245b8a00 100644 --- a/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/translatable_index.html +++ b/wagtail_localize/modeladmin/templates/wagtail_localize/modeladmin/translatable_index.html @@ -2,17 +2,13 @@ {% load i18n modeladmin_tags wagtailadmin_tags %} {% block header_extra %} -
-
- {% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' %} -
+ {% if not translations %}
{% endif %} + {% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' theme="large" %} + {% if not translations %}
{% endif %} {% if user_can_create %} -
- {% include 'wagtail_localize/modeladmin/includes/button.html' with button=view.button_helper.add_button %} -
+ {% include 'wagtail_localize/modeladmin/includes/button.html' with button=view.button_helper.add_button icon="plus" %} {% endif %} {% if view.list_export %} {% include view.export_buttons_template_name %} {% endif %} -
{% endblock %}