0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

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

This commit is contained in:
Matt Westcott 2024-01-19 19:30:07 +00:00 committed by Sage Abdullah
parent 3c59309932
commit fcf1a67f1e
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217

View File

@ -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]