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:
parent
3c59309932
commit
fcf1a67f1e
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user