From da55e4bca7d2c3d61ccf0dccf7f157b9abc7c331 Mon Sep 17 00:00:00 2001 From: Matt Westcott Date: Thu, 7 Mar 2019 18:39:19 +0000 Subject: [PATCH] Reverse the logic of the not_sortable_by_type flag --- wagtail/admin/templates/wagtailadmin/pages/index.html | 2 +- .../wagtailadmin/pages/listing/_table_headers_explore.html | 3 ++- wagtail/admin/templates/wagtailadmin/pages/search_results.html | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/wagtail/admin/templates/wagtailadmin/pages/index.html b/wagtail/admin/templates/wagtailadmin/pages/index.html index 2732d8400..b88d94741 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/index.html +++ b/wagtail/admin/templates/wagtailadmin/pages/index.html @@ -14,7 +14,7 @@ {% csrf_token %} {% page_permissions parent_page as parent_page_perms %} - {% include "wagtailadmin/pages/listing/_list_explore.html" with sortable=1 full_width=1 show_ordering_column=1 parent_page=parent_page orderable=parent_page_perms.can_reorder_children %} + {% include "wagtailadmin/pages/listing/_list_explore.html" with sortable=1 sortable_by_type=1 full_width=1 show_ordering_column=1 parent_page=parent_page orderable=parent_page_perms.can_reorder_children %} {% if do_paginate %} {% url 'wagtailadmin_explore' parent_page.id as pagination_base_url %} diff --git a/wagtail/admin/templates/wagtailadmin/pages/listing/_table_headers_explore.html b/wagtail/admin/templates/wagtailadmin/pages/listing/_table_headers_explore.html index 2309f8124..2af07e545 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/listing/_table_headers_explore.html +++ b/wagtail/admin/templates/wagtailadmin/pages/listing/_table_headers_explore.html @@ -5,6 +5,7 @@ Table headers for the page listing, when in 'explore' mode. Expects the following variables: sortable: if true, headings are links to wagtailadmin_explore with sort parameters applied. +sortable_by_type: must be true to allow sorting on the 'type' column show_ordering_column: if true, an 'ordering' column is added. orderable: if true, the 'ordering' column is populated (again with links to wagtailadmin_explore). @@ -49,7 +50,7 @@ ordering: the current sort parameter {% endif %} - {% if sortable and not not_sortable_by_type %} + {% if sortable and sortable_by_type %} {% trans 'Type' %} diff --git a/wagtail/admin/templates/wagtailadmin/pages/search_results.html b/wagtail/admin/templates/wagtailadmin/pages/search_results.html index 0d6c25e36..6df2ff87c 100644 --- a/wagtail/admin/templates/wagtailadmin/pages/search_results.html +++ b/wagtail/admin/templates/wagtailadmin/pages/search_results.html @@ -32,7 +32,7 @@ {% endif %} - {% include "wagtailadmin/pages/listing/_list_explore.html" with show_parent=1 sortable=1 not_sortable_by_type=1 %} + {% include "wagtailadmin/pages/listing/_list_explore.html" with show_parent=1 sortable=1 sortable_by_type=0 %} {% url 'wagtailadmin_pages:search' as pagination_base_url %} {% paginate pages base_url=pagination_base_url %}