Skip to content

Commit

Permalink
Enable Index filtering for all Models by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis Igoumenos committed May 13, 2022
1 parent 3a291af commit 04087bf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/templates/ApiUsers/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down
4 changes: 2 additions & 2 deletions app/templates/Cous/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down
7 changes: 5 additions & 2 deletions app/templates/Standard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'];

Expand Down Expand Up @@ -157,9 +160,9 @@ function _column_key($modelsName, $c, $tz=null) {
<?php endif; // $banners ?>

<!-- Search block -->
<?php if(!empty($enableFiltering)): ?>
<?php if(!$disableFiltering): ?>
<?= $this->element('filter'); ?>
<?php endif; // $enableFiltering ?>
<?php endif; ?>

<!-- Index table -->
<div class="table-container">
Expand Down
4 changes: 2 additions & 2 deletions app/templates/Types/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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' => [
Expand Down

0 comments on commit 04087bf

Please sign in to comment.