From a40a33ba0d34b168469791e0b3d63f5939f07fed Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Thu, 5 May 2022 20:10:00 +0300 Subject: [PATCH] Enable Index filtering for all Models by default --- app/templates/ApiUsers/columns.inc | 4 ++-- app/templates/Cous/columns.inc | 4 ++-- app/templates/Standard/index.php | 7 +++++-- app/templates/Types/columns.inc | 4 ++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/app/templates/ApiUsers/columns.inc b/app/templates/ApiUsers/columns.inc index c03b5a56c..87c426e6b 100644 --- a/app/templates/ApiUsers/columns.inc +++ b/app/templates/ApiUsers/columns.inc @@ -32,8 +32,8 @@ if($vv_cur_co->id == 1) { ]; } -// Turn on the search/filter box for this index view -$enableFiltering = true; +// Turn off the search/filter box for this index view +//$disableFiltering = true; $indexColumns = [ 'username' => [ diff --git a/app/templates/Cous/columns.inc b/app/templates/Cous/columns.inc index d2b50c09b..d50fd5ed2 100644 --- a/app/templates/Cous/columns.inc +++ b/app/templates/Cous/columns.inc @@ -25,8 +25,8 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -// Turn on the search/filter box for this index view -$enableFiltering = true; +// Turn off the search/filter box for this index view +//$disableFiltering = true; $indexColumns = [ 'name' => [ diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index d602c32e1..a828e16e1 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -45,6 +45,9 @@ // Otherwise, we'll print out a "no records" message. $recordsExist = false; +// By default Index filtering is on and we need to explicitly disable it +$disableFiltering = false; + // Our default link actions, in order of preference, unless the column config overrides it $linkActions = ['edit', 'view']; @@ -157,9 +160,9 @@ function _column_key($modelsName, $c, $tz=null) { - + element('filter'); ?> - +
diff --git a/app/templates/Types/columns.inc b/app/templates/Types/columns.inc index 34a9deb23..0a3b29676 100644 --- a/app/templates/Types/columns.inc +++ b/app/templates/Types/columns.inc @@ -25,8 +25,8 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ -// Turn on the search/filter box for this index view -$enableFiltering = true; +// Turn off the search/filter box for this index view +//$disableFiltering = true; $indexColumns = [ 'display_name' => [