Skip to content

Commit

Permalink
Improve Manage Matchgrid layout: make Matchgrid History a top-link, a…
Browse files Browse the repository at this point in the history
…nd shorten label to "History" (CO-2527)
  • Loading branch information
arlen committed Oct 7, 2022
1 parent 98b8a87 commit 535e17a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 12 deletions.
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/default.po
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,9 @@ msgstr "Filter"
msgid "match.op.go"
msgstr "Go"

msgid "match.op.history"
msgstr "History"

msgid "match.op.last"
msgstr "Last"

Expand Down
3 changes: 2 additions & 1 deletion app/src/View/Helper/MenuHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
3 changes: 2 additions & 1 deletion app/templates/MatchgridRecords/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ $indexActions = [
'sorid' => $e->sorid
];
},
'icon' => 'history'
'icon' => 'history',
'label' => __('match.op.history')
]
];
33 changes: 23 additions & 10 deletions app/templates/Matchgrids/manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,29 @@
<div class="pageTitle">
<h1><?= $vv_title; ?></h1>
</div>

<?php
// topLinks menu dropdown / button listing
$action_args = array();
$action_args['vv_attr_mdl'] = "IndexTopLinks";
$action_args['vv_actions'][] = array(
'order' => $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 '<div id="topLinks" class="field-actions">';
print $this->element('menuAction', $action_args);
print '</div>';
}
?>
</div>

<section class="inner-content">
Expand Down Expand Up @@ -61,15 +84,5 @@
?>
<div class="call-to-action-text"><?= __('match.in.matchgrid.reconcile'); ?></div>
</div>
<div class="call-to-action">
<?= $this->Html->link('<em class="material-icons" aria-hidden="true">list</em>' . __('match.op.display.history'),
['controller' => 'MatchgridHistoryRecords',
'action' => 'index',
'?' => ['matchgrid_id' => $vv_cur_mg->id]
],
['escape' => false, 'class' => 'btn btn-default']);
?>
<div class="call-to-action-text"><?= __('match.in.matchgrid.history'); ?></div>
</div>
</div>
</section>

0 comments on commit 535e17a

Please sign in to comment.