diff --git a/app/templates/Cos/columns.inc b/app/templates/Cos/columns.inc index d51b1a503..a6a35d2e6 100644 --- a/app/templates/Cos/columns.inc +++ b/app/templates/Cos/columns.inc @@ -38,7 +38,19 @@ $indexColumns = [ ] ]; +// $topLinks appear as an upper right menu +$topLinks = []; + +// $rowActions appear as row-level menu items in the index view gear icon +$rowActions = [ + [ + 'action' => 'duplicate', + 'class' => '', + 'icon' => 'content_copy' + ] +]; + +// TODO: develop bulk actions. For now, use a placeholder. $bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true ]; diff --git a/app/templates/Groups/actions.inc b/app/templates/Groups/actions.inc deleted file mode 100644 index 9f200ddbc..000000000 --- a/app/templates/Groups/actions.inc +++ /dev/null @@ -1,73 +0,0 @@ - 'group_members', - 'action' => 'index', - 'icon' => 'people', - 'type' => 'tab' - ], - [ - 'controller' => 'group_owners', - 'action' => 'index', - 'icon' => 'settings', - 'type' => 'tab' - ], - [ - 'controller' => 'group_nestings', - 'action' => 'index', - 'icon' => 'group_add', - 'type' => 'tab' - ], - [ - 'controller' => 'history_records', - 'action' => 'index', - 'icon' => 'history', - 'type' => 'tab' - ], - [ - 'controller' => 'identifiers', - 'action' => 'index', - 'icon' => 'label', - 'if' => 'notAutomatic', - 'type' => 'tab' - ], - [ - 'action' => 'reconcile', - 'icon' => 'sync', - 'type' => 'top-link' - ] -]; \ No newline at end of file diff --git a/app/templates/Groups/columns.inc b/app/templates/Groups/columns.inc index cb489e127..9ff193020 100644 --- a/app/templates/Groups/columns.inc +++ b/app/templates/Groups/columns.inc @@ -39,7 +39,44 @@ $indexColumns = [ ] ]; +// $topLinks appear as an upper right menu +$topLinks = []; + +// $rowActions appear as row-level menu items in the index view gear icon +$rowActions = [ + [ + 'controller' => 'group_members', + 'action' => 'index', + 'icon' => 'people' + ], + [ + 'controller' => 'group_owners', + 'action' => 'index', + 'icon' => 'settings' + ], + [ + 'controller' => 'group_nestings', + 'action' => 'index', + 'icon' => 'group_add' + ], + [ + 'controller' => 'history_records', + 'action' => 'index', + 'icon' => 'history' + ], + [ + 'controller' => 'identifiers', + 'action' => 'index', + 'icon' => 'label', + 'if' => 'notAutomatic' + ], + [ + 'action' => 'reconcile', + 'icon' => 'sync' + ] +]; + +// TODO: develop bulk actions. For now, use a placeholder. $bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true ]; \ No newline at end of file diff --git a/app/templates/Names/actions.inc b/app/templates/Groups/fields-nav.inc similarity index 74% rename from app/templates/Names/actions.inc rename to app/templates/Groups/fields-nav.inc index 5966a2c86..38d21495f 100644 --- a/app/templates/Names/actions.inc +++ b/app/templates/Groups/fields-nav.inc @@ -1,6 +1,6 @@ 'primary', - 'icon' => 'publish', - 'if' => 'notPrimary' + 'icon' => 'sync', + 'order' => 'Default', + 'label' => __d('operation', 'reconcile'), + 'link' => [ + 'action' => 'reconcile' + ], + 'class' => '' ] ]; \ No newline at end of file diff --git a/app/templates/Names/columns.inc b/app/templates/Names/columns.inc index 58ae42d4d..0e648e3d4 100644 --- a/app/templates/Names/columns.inc +++ b/app/templates/Names/columns.inc @@ -39,7 +39,19 @@ $indexColumns = [ ] ]; +// $topLinks appear as an upper right menu +$topLinks = []; + +// $rowActions appear as row-level menu items in the index view gear icon +$rowActions = [ + [ + 'action' => 'primary', + 'icon' => 'publish', + 'if' => 'notPrimary' + ] +]; + +// TODO: develop bulk actions. For now, use a placeholder. $bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true ]; \ No newline at end of file diff --git a/app/templates/People/actions.inc b/app/templates/People/actions.inc deleted file mode 100644 index 5d0cfa8d1..000000000 --- a/app/templates/People/actions.inc +++ /dev/null @@ -1,103 +0,0 @@ - 'names', - 'action' => 'index', - 'icon' => 'account_box', - 'iconClass' => 'material-icons-outlined', - 'type' => 'tab' - ], - [ - 'controller' => 'email_addresses', - 'action' => 'index', - 'icon' => 'email', - 'iconClass' => 'material-icons-outlined', - 'type' => 'tab' - ], - [ - 'controller' => 'identifiers', - 'action' => 'index', - 'icon' => 'fingerprint', - 'type' => 'tab', - 'class' => 'bottom-border' - ], - [ - 'controller' => 'person_roles', - 'action' => 'index', - 'icon' => 'emoji_people', - 'type' => 'tab' - ], - [ - 'controller' => 'external_identities', - 'action' => 'index', - 'icon' => 'system_update_alt', - 'type' => 'tab', - 'class' => 'bottom-border' - ], - [ - 'controller' => 'ad_hoc_attributes', - 'action' => 'index', - 'icon' => 'check_box', - 'iconClass' => 'material-icons-outlined', - 'type' => 'tab' - ], - [ - 'controller' => 'addresses', - 'action' => 'index', - 'icon' => 'contact_mail', - 'iconClass' => 'material-icons-outlined', - 'type' => 'tab' - ], - [ - 'controller' => 'history_records', - 'action' => 'index', - 'icon' => 'history', - 'type' => 'tab' - ], - [ - 'controller' => 'telephone_numbers', - 'action' => 'index', - 'icon' => 'phone', - 'type' => 'tab' - ], - [ - 'controller' => 'urls', - 'action' => 'index', - 'icon' => 'link', - 'type' => 'tab' - ] -]; diff --git a/app/templates/People/columns.inc b/app/templates/People/columns.inc index 641aaa171..d29f8d6a8 100644 --- a/app/templates/People/columns.inc +++ b/app/templates/People/columns.inc @@ -40,7 +40,80 @@ $indexColumns = [ ] ]; +// $topLinks appear as an upper right menu +$topLinks = []; + +// $rowActions appear as row-level menu items in the index view gear icon +$rowActions = [ + [ + 'controller' => 'names', + 'action' => 'index', + 'icon' => 'account_box', + 'iconClass' => 'material-icons-outlined', + 'type' => 'tab' + ], + [ + 'controller' => 'email_addresses', + 'action' => 'index', + 'icon' => 'email', + 'iconClass' => 'material-icons-outlined', + 'type' => 'tab' + ], + [ + 'controller' => 'identifiers', + 'action' => 'index', + 'icon' => 'fingerprint', + 'type' => 'tab', + 'class' => 'bottom-border' + ], + [ + 'controller' => 'person_roles', + 'action' => 'index', + 'icon' => 'emoji_people', + 'type' => 'tab' + ], + [ + 'controller' => 'external_identities', + 'action' => 'index', + 'icon' => 'system_update_alt', + 'type' => 'tab', + 'class' => 'bottom-border' + ], + [ + 'controller' => 'ad_hoc_attributes', + 'action' => 'index', + 'icon' => 'check_box', + 'iconClass' => 'material-icons-outlined', + 'type' => 'tab' + ], + [ + 'controller' => 'addresses', + 'action' => 'index', + 'icon' => 'contact_mail', + 'iconClass' => 'material-icons-outlined', + 'type' => 'tab' + ], + [ + 'controller' => 'history_records', + 'action' => 'index', + 'icon' => 'history', + 'type' => 'tab' + ], + [ + 'controller' => 'telephone_numbers', + 'action' => 'index', + 'icon' => 'phone', + 'type' => 'tab' + ], + [ + 'controller' => 'urls', + 'action' => 'index', + 'icon' => 'link', + 'type' => 'tab' + ] +]; + +// TODO: develop bulk actions. For now, use a placeholder. $bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. 'expunge' => true ]; \ No newline at end of file diff --git a/app/templates/Standard/add-edit-view.php b/app/templates/Standard/add-edit-view.php index d6a58418b..abb41d9a4 100644 --- a/app/templates/Standard/add-edit-view.php +++ b/app/templates/Standard/add-edit-view.php @@ -36,6 +36,22 @@ // If you're looking to set a custom $vv_title, you might be able to use // generateDisplayField() on the Table instead + +// Include subnavigation structures on edit pages +// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of fields-nav.inc into fields.inc. +if($vv_action == 'edit') { + if(file_exists(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc")) { + include(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc"); + } +} + +// $linkFilter is used for models that belong to a specific parent model (eg: co_id) +$linkFilter = []; + +if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { + $linkFilter = [$vv_primary_link => $this->request->getQuery($vv_primary_link)]; +} + ?>