Browse Source

Ensure non-IndexView BaseListingView subclasses use the correct base templates

Now that the listing_results.html template supports rendering the "There
are x matches" message, we can enforce the consistency between the view
class and the template. Previously there were BaseListingView subclasses
(that are not IndexView subclasses) that used the index_results.html
template just to get that message when filtering.
Sage Abdullah 7 months ago
parent
commit
f155546f65

+ 0 - 1
wagtail/admin/templates/wagtailadmin/generic/history_results.html

@@ -1 +0,0 @@
-{% extends "wagtailadmin/generic/index_results.html" %}

+ 0 - 1
wagtail/admin/views/generic/history.py

@@ -198,7 +198,6 @@ class LogEntryUserColumn(UserColumn):
 class HistoryView(PermissionCheckedMixin, BaseObjectMixin, BaseListingView):
     any_permission_required = ["add", "change", "delete"]
     page_title = gettext_lazy("History")
-    results_template_name = "wagtailadmin/generic/history_results.html"
     header_icon = "history"
     paginate_by = 20
     filterset_class = HistoryFilterSet

+ 1 - 1
wagtail/contrib/forms/templates/wagtailforms/list_submissions.html

@@ -1,4 +1,4 @@
-{% extends "wagtailadmin/generic/index_results.html" %}
+{% extends "wagtailadmin/generic/listing_results.html" %}
 {% load i18n l10n %}
 {% block results %}
     <form class="w-overflow-auto" data-controller="w-bulk" data-w-bulk-action-inactive-class="w-invisible" action="{% url 'wagtailforms:delete_submissions' form_page.id %}" method="get">