Skip to content

Commit

Permalink
Tidy up the modeladmin header
Browse files Browse the repository at this point in the history
  • Loading branch information
zerolab committed Feb 11, 2024
1 parent 21883b6 commit 0bdcd94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
<a{% if button.url %} href="{{ button.url }}{% if locale %}?locale={{ locale.language_code }}{% endif %}"{% endif %} class="{{ button.classname }}" title="{{ button.title }}"{% if button.target %} target="{{ button.target }}"{% endif %}{% if button.rel %} rel="{{ button.rel }}"{% endif %}>{{ button.label }}</a>
{% load wagtailadmin_tags %}
<a{% if button.url %} href="{{ button.url }}{% if locale %}?locale={{ locale.language_code }}{% endif %}"{% endif %} class="{{ button.classname }}" title="{{ button.title }}"{% if button.target %} target="{{ button.target }}"{% endif %}{% if button.rel %} rel="{{ button.rel }}"{% endif %}>{% if icon %}<span class="icon-wrapper">{% icon name=icon %}</span> {% endif %}{{ button.label }}</a>
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
{% load i18n modeladmin_tags wagtailadmin_tags %}

{% block header_extra %}
<div class="right header-right">
<div class="col">
{% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' %}
</div>
{% if not translations %}<div class="button button-secondary">{% endif %}
{% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' theme="large" %}
{% if not translations %}</div>{% endif %}
{% if user_can_create %}
<div class="actionbutton col">
{% include 'wagtail_localize/modeladmin/includes/button.html' with button=view.button_helper.add_button %}
</div>
{% 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 %}
</div>
{% endblock %}

0 comments on commit 0bdcd94

Please sign in to comment.