Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for whether an "add" link should be included in the index vi…
…ew (CO-2585) (#58)
arlen committed Mar 29, 2023
1 parent 479d6a7 commit 0727b54
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions app/templates/Standard/index.php
@@ -222,12 +222,14 @@ function _column_key($modelsName, $c, $tz=null) {
$addLink = $addLinkFilter($addLink, $this->request);
}

$action_args['vv_actions'][] = array(
'order' => $this->Menu->getMenuOrder('Add'),
'icon' => $this->Menu->getMenuIcon('Add'),
'url' => $this->Url->build($addLink),
'label' => __('match.op.add.a', __('match.ct.'.$vv_modelname, [1]))
);
if($addLink) {
$action_args['vv_actions'][] = array(
'order' => $this->Menu->getMenuOrder('Add'),
'icon' => $this->Menu->getMenuIcon('Add'),
'url' => $this->Url->build($addLink),
'label' => __('match.op.add.a', __('match.ct.'.$vv_modelname, [1]))
);
}

// Output the topLinks
if(!empty($action_args['vv_actions'])) {

0 comments on commit 0727b54

Please sign in to comment.