From 67ac09561f0751d1f405789c2ab1bd9be89d890a Mon Sep 17 00:00:00 2001 From: Ioannis Igoumenos Date: Sun, 1 May 2022 13:37:04 +0300 Subject: [PATCH] Fixes required after Filtering feature initial commit --- app/src/View/Helper/MenuHelper.php | 3 ++- app/templates/Standard/index.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/View/Helper/MenuHelper.php b/app/src/View/Helper/MenuHelper.php index 3ac9dd8b6..0752e1052 100644 --- a/app/src/View/Helper/MenuHelper.php +++ b/app/src/View/Helper/MenuHelper.php @@ -80,7 +80,8 @@ public function getMenuIcon($action) { 'Delete' => 'delete' ); - return $icon[$action]; + // For the actions with Default order we can pass directly the name of the icon + return $icon[$action] ?? $action; } } \ No newline at end of file diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 751378bfc..d602c32e1 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -122,7 +122,7 @@ function _column_key($modelsName, $c, $tz=null) { } $action_args['vv_actions'][] = [ - 'order' => $this->Menu->getMenuOrder($t['icon']), + 'order' => $this->Menu->getMenuOrder($t['order']), 'icon' => $this->Menu->getMenuIcon($t['icon']), 'url' => $this->Url->build($t['link']), 'label' => $t['label'],