From 535e17a0505bf1ced2f853aa0b6a1cde5ed54116 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Fri, 7 Oct 2022 10:01:18 -0400 Subject: [PATCH] Improve Manage Matchgrid layout: make Matchgrid History a top-link, and shorten label to "History" (CO-2527) --- app/resources/locales/en_US/default.po | 3 ++ app/src/View/Helper/MenuHelper.php | 3 +- app/templates/MatchgridRecords/columns.inc | 3 +- app/templates/Matchgrids/manage.php | 33 +++++++++++++++------- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/app/resources/locales/en_US/default.po b/app/resources/locales/en_US/default.po index c430ce587..c2accef26 100644 --- a/app/resources/locales/en_US/default.po +++ b/app/resources/locales/en_US/default.po @@ -656,6 +656,9 @@ msgstr "Filter" msgid "match.op.go" msgstr "Go" +msgid "match.op.history" +msgstr "History" + msgid "match.op.last" msgstr "Last" diff --git a/app/src/View/Helper/MenuHelper.php b/app/src/View/Helper/MenuHelper.php index 57ca4035c..cdd3a6970 100644 --- a/app/src/View/Helper/MenuHelper.php +++ b/app/src/View/Helper/MenuHelper.php @@ -79,7 +79,8 @@ public function getMenuIcon($action) { 'Edit' => 'edit', 'Duplicate' => 'content_copy', 'Default' => 'link', // default icon for arbitrary menu items - 'Delete' => 'delete' + 'Delete' => 'delete', + 'History' => 'history' ); return $icon[$action]; diff --git a/app/templates/MatchgridRecords/columns.inc b/app/templates/MatchgridRecords/columns.inc index 958746848..9a9915603 100644 --- a/app/templates/MatchgridRecords/columns.inc +++ b/app/templates/MatchgridRecords/columns.inc @@ -82,6 +82,7 @@ $indexActions = [ 'sorid' => $e->sorid ]; }, - 'icon' => 'history' + 'icon' => 'history', + 'label' => __('match.op.history') ] ]; diff --git a/app/templates/Matchgrids/manage.php b/app/templates/Matchgrids/manage.php index 6b548c9af..7ad958de4 100644 --- a/app/templates/Matchgrids/manage.php +++ b/app/templates/Matchgrids/manage.php @@ -31,6 +31,29 @@

+ + $this->Menu->getMenuOrder('Add'), + 'icon' => $this->Menu->getMenuIcon('History'), + 'url' => $this->Url->build([ + 'controller' => 'MatchgridHistoryRecords', + 'action' => 'index', + '?' => ['matchgrid_id' => $vv_cur_mg->id] + ]), + 'label' => __('match.op.history') + ); + + // Output the topLinks + if(!empty($action_args['vv_actions'])) { + print ''; + } + ?>
@@ -61,15 +84,5 @@ ?>
-
- Html->link('' . __('match.op.display.history'), - ['controller' => 'MatchgridHistoryRecords', - 'action' => 'index', - '?' => ['matchgrid_id' => $vv_cur_mg->id] - ], - ['escape' => false, 'class' => 'btn btn-default']); - ?> -
-