diff --git a/wagtail/admin/templates/wagtailadmin/generic/index.html b/wagtail/admin/templates/wagtailadmin/generic/index.html index 58e86c1451..18a48d7b4e 100644 --- a/wagtail/admin/templates/wagtailadmin/generic/index.html +++ b/wagtail/admin/templates/wagtailadmin/generic/index.html @@ -13,3 +13,20 @@ {% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label action_icon=header_action_icon extra_actions=extra_actions icon=header_icon search_url=search_url search_form=search_form search_results_url=index_results_url only %} {% endif %} {% endblock %} + +{% block listing %} + {% comment %} + DEPRECATED: This block override is for supporting views that have filters + but not using breadcrumbs (thus have no slim_header to put the filters in). + There is no longer such a view in Wagtail core, but we keep this block + until we can enforce the use of breadcrumbs in all listing views. + {% endcomment %} + {% if filters and not breadcrumbs_items %} +
+ {{ block.super }} + {% include "wagtailadmin/shared/filters.html" %} +
+ {% else %} + {{ block.super }} + {% endif %} +{% endblock %} diff --git a/wagtail/admin/templates/wagtailadmin/generic/listing.html b/wagtail/admin/templates/wagtailadmin/generic/listing.html index 450b8dfd8a..53d92e1921 100644 --- a/wagtail/admin/templates/wagtailadmin/generic/listing.html +++ b/wagtail/admin/templates/wagtailadmin/generic/listing.html @@ -1,29 +1,23 @@ {% extends "wagtailadmin/generic/base.html" %} {% load i18n %} -{% block main_header %} - {% if not breadcrumbs_items %} - {% include "wagtailadmin/shared/header.html" with title=page_title subtitle=page_subtitle action_url=header_action_url action_text=header_action_label icon=header_icon only %} - {% endif %} -{% endblock %} - {% block content %} + {% comment %} + Override the content block instead of main_content so we get the full-width layout without the nice-padding. + However, this means we need to include the header block again (and only do {{ block.super }} inside it). + {% endcomment %} + {% block header %} {{ block.super }} {% endblock %} {% block listing %} -