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

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

Wyświetl plik

@ -158,13 +158,6 @@ class IndexView(generic.IndexView):
sort_key="latest_revision_created_at",
width="12%",
),
Column(
"type",
label=_("Type"),
accessor="page_type_display_name",
sort_key="content_type",
width="12%",
),
PageStatusColumn(
"status",
label=_("Status"),
@ -195,8 +188,11 @@ class IndexView(generic.IndexView):
if self.is_searching:
# ordering by content type not currently available when searching, due to
# https://github.com/wagtail/wagtail/issues/6616
try:
valid_orderings.remove("content_type")
valid_orderings.remove("-content_type")
except ValueError:
pass
return valid_orderings
@ -313,9 +309,22 @@ class ExplorableIndexView(IndexView):
index_results_url_name = "wagtailadmin_explore_results"
page_title = _("Exploring")
columns = IndexView.columns + [
columns = (
IndexView.columns[0:3]
+ [
Column(
"type",
label=_("Type"),
accessor="page_type_display_name",
sort_key="content_type",
width="12%",
),
]
+ IndexView.columns[3:]
+ [
NavigateToChildrenColumn("navigate", width="10%"),
]
)
def get(self, request, parent_page_id=None):
if parent_page_id: