diff --git a/wagtail/admin/templates/wagtailadmin/shared/header.html b/wagtail/admin/templates/wagtailadmin/shared/header.html index 84bcdd7749..c860f90dbc 100644 --- a/wagtail/admin/templates/wagtailadmin/shared/header.html +++ b/wagtail/admin/templates/wagtailadmin/shared/header.html @@ -38,14 +38,16 @@ {% endif %} -
- {% if action_url %} -
- {% with action_icon|default:'plus' as action_icon_name %} - {% icon name=action_icon_name wrapped=1 %}{{ action_text }} - {% endwith %} -
- {% endif %} +
+ {% block right_column %} + {% if action_url %} +
+ {% with action_icon|default:'plus' as action_icon_name %} + {% icon name=action_icon_name wrapped=1 %}{{ action_text }} + {% endwith %} +
+ {% endif %} + {% endblock %}
diff --git a/wagtail/admin/templates/wagtailadmin/shared/header_with_locale_selector.html b/wagtail/admin/templates/wagtailadmin/shared/header_with_locale_selector.html new file mode 100644 index 0000000000..bc5fab9088 --- /dev/null +++ b/wagtail/admin/templates/wagtailadmin/shared/header_with_locale_selector.html @@ -0,0 +1,17 @@ +{% extends "wagtailadmin/shared/header.html" %} + +{% block right_column_classname %}right col{% endblock %} +{% block right_column %} +
{# HACK Removes list-style-type #} + +
+ {{ block.super }} +{% endblock %} diff --git a/wagtail/snippets/templates/wagtailsnippets/snippets/create.html b/wagtail/snippets/templates/wagtailsnippets/snippets/create.html index a67eecd9ac..619f801d51 100644 --- a/wagtail/snippets/templates/wagtailsnippets/snippets/create.html +++ b/wagtail/snippets/templates/wagtailsnippets/snippets/create.html @@ -2,29 +2,8 @@ {% load i18n wagtailadmin_tags %} {% block titletag %}{% blocktrans with snippet_type_name=model_opts.verbose_name %}New {{ snippet_type_name }}{% endblocktrans %}{% endblock %} {% block content %} -
-
-
-
-

{% icon name="snippet" class_name="header-title-icon" %} - {% trans "New" %} {{ model_opts.verbose_name }}

-
-
-
-
{# HACK Removes list-style-type #} -
    - {% if locale %} -
  • -
    - {% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' %} -
    -
  • - {% endif %} -
-
-
-
-
+ {% trans "New" as new_str %} + {% include "wagtailadmin/shared/header_with_locale_selector.html" with title=new_str subtitle=model_opts.verbose_name icon="snippet" tabbed=1 merged=1 %}
{% csrf_token %} diff --git a/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html b/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html index 546bdae6d3..b1bd3c6681 100644 --- a/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html +++ b/wagtail/snippets/templates/wagtailsnippets/snippets/edit.html @@ -2,29 +2,8 @@ {% load wagtailadmin_tags i18n %} {% block titletag %}{% blocktrans with snippet_type_name=model_opts.verbose_name %}Editing {{ snippet_type_name }} - {{ instance }}{% endblocktrans %}{% endblock %} {% block content %} -
-
-
-
-

{% icon name="snippet" class_name="header-title-icon" %} - {% trans "Editing" %} {{ instance }}

-
-
-
- {# HACK Removes list-style-type #} -
    - {% if locale %} -
  • -
    - {% include 'wagtailadmin/shared/locale_selector.html' with class='c-dropdown--large' %} -
    -
  • - {% endif %} -
- -
-
-
+ {% trans "Editing" as editing_str %} + {% include "wagtailadmin/shared/header_with_locale_selector.html" with title=editing_str subtitle=instance icon="snippet" tabbed=1 merged=1 %}