Leave out the page type filter from flat page listings by default

pull/11485/head
Matt Westcott 2024-01-19 19:30:07 +00:00 zatwierdzone przez Sage Abdullah
rodzic 3c59309932
commit fcf1a67f1e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: EB1A33CC51CC0217
1 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -68,11 +68,6 @@ class EditedByFilter(MultipleUserFilter):
class PageFilterSet(WagtailFilterSet):
content_type = MultipleContentTypeFilter(
label=_("Page type"),
queryset=lambda request: get_page_content_types(include_base_page_type=False),
widget=CheckboxSelectMultiple,
)
latest_revision_created_at = DateFromToRangeFilter(
label=_("Date updated"),
widget=DateRangePickerWidget,
@ -120,6 +115,14 @@ class PageFilterSet(WagtailFilterSet):
fields = [] # only needed for filters being generated automatically
class ExplorablePageFilterSet(PageFilterSet):
content_type = MultipleContentTypeFilter(
label=_("Page type"),
queryset=lambda request: get_page_content_types(include_base_page_type=False),
widget=CheckboxSelectMultiple,
)
class IndexView(generic.IndexView):
template_name = "wagtailadmin/pages/index.html"
results_template_name = "wagtailadmin/pages/index_results.html"
@ -308,6 +311,7 @@ class ExplorableIndexView(IndexView):
index_url_name = "wagtailadmin_explore"
index_results_url_name = "wagtailadmin_explore_results"
page_title = _("Exploring")
filterset_class = ExplorablePageFilterSet
columns = (
IndexView.columns[0:3]