diff --git a/app/templates/ExternalIdentities/columns.inc b/app/templates/ExternalIdentities/columns.inc index 52805d7b5..5ed7c1df5 100644 --- a/app/templates/ExternalIdentities/columns.inc +++ b/app/templates/ExternalIdentities/columns.inc @@ -48,4 +48,6 @@ $bulkActions = [ $subnav = [ 'name' => 'person', 'active' => 'external_identities' -]; \ No newline at end of file +]; + +$suppressAddLink = true; \ No newline at end of file diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 84d2fff99..7315a375d 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -98,19 +98,23 @@ if($vv_permissions['add']) { $action_args = array(); $action_args['vv_attr_id'] = $vv_user['username']; - - $action_args['vv_actions'][] = [ - 'order' => $this->Menu->getMenuOrder('Add'), - 'icon' => $this->Menu->getMenuIcon('Add'), - 'url' => $this->Url->build( - [ - 'controller' => $modelsName, - 'action' => 'add', - '?' => $linkFilter - ] - ), - 'label' => __d('operation', 'add.a', __d('controller', $modelsName, [1])), - ]; + $action_args['vv_actions'] = array(); + + // Include the Add link to actions menu unless suppressed by the page + if(empty($suppressAddLink)) { + $action_args['vv_actions'][] = [ + 'order' => $this->Menu->getMenuOrder('Add'), + 'icon' => $this->Menu->getMenuIcon('Add'), + 'url' => $this->Url->build( + [ + 'controller' => $modelsName, + 'action' => 'add', + '?' => $linkFilter + ] + ), + 'label' => __d('operation', 'add.a', __d('controller', $modelsName, [1])), + ]; + } foreach(($topLinks ?? []) as $t) { if($vv_permissions[ $t['link']['action'] ]) {