kopia lustrzana https://github.com/wagtail/wagtail
Add page model name as page title for flat page listings
rodzic
1efe424b93
commit
af8330d087
|
@ -138,11 +138,11 @@ class IndexView(generic.IndexView):
|
||||||
table_class = PageTable
|
table_class = PageTable
|
||||||
table_classname = "listing full-width"
|
table_classname = "listing full-width"
|
||||||
filterset_class = PageFilterSet
|
filterset_class = PageFilterSet
|
||||||
page_title = _("Pages")
|
|
||||||
index_url_name = None
|
index_url_name = None
|
||||||
index_results_url_name = None
|
index_results_url_name = None
|
||||||
default_ordering = "-latest_revision_created_at"
|
default_ordering = "-latest_revision_created_at"
|
||||||
model = Page
|
model = Page
|
||||||
|
_show_breadcrumbs = True
|
||||||
|
|
||||||
columns = [
|
columns = [
|
||||||
BulkActionsColumn("bulk_actions"),
|
BulkActionsColumn("bulk_actions"),
|
||||||
|
@ -280,6 +280,9 @@ class IndexView(generic.IndexView):
|
||||||
def get_index_results_url(self):
|
def get_index_results_url(self):
|
||||||
return reverse(self.index_results_url_name)
|
return reverse(self.index_results_url_name)
|
||||||
|
|
||||||
|
def get_breadcrumbs_items(self):
|
||||||
|
return self.breadcrumbs_items + [{"url": "", "label": self.get_page_title()}]
|
||||||
|
|
||||||
def get_table_kwargs(self):
|
def get_table_kwargs(self):
|
||||||
kwargs = super().get_table_kwargs()
|
kwargs = super().get_table_kwargs()
|
||||||
kwargs["actions_next_url"] = self.index_url
|
kwargs["actions_next_url"] = self.index_url
|
||||||
|
|
Ładowanie…
Reference in New Issue