From acfc840a7d3b14d91065efeac8ad721d24acfc38 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Tue, 11 Oct 2022 12:32:17 -0400 Subject: [PATCH 1/7] Submenus first commit: add submenus to People and Groups (CFM-192) --- app/resources/locales/en_US/menu.po | 3 + app/src/Controller/MVEAController.php | 12 +- app/src/Controller/StandardController.php | 7 + app/templates/AdHocAttributes/columns.inc | 6 + app/templates/AdHocAttributes/fields-nav.inc | 35 +++ app/templates/Addresses/columns.inc | 6 + app/templates/Addresses/fields-nav.inc | 35 +++ app/templates/EmailAddresses/columns.inc | 6 + app/templates/EmailAddresses/fields-nav.inc | 35 +++ app/templates/ExternalIdentities/columns.inc | 5 + app/templates/GroupMembers/columns.inc | 5 + .../{Groups => GroupMembers}/fields-nav.inc | 18 +- app/templates/GroupNestings/columns.inc | 5 + app/templates/GroupNestings/fields-nav.inc | 34 +++ app/templates/GroupOwners/columns.inc | 5 + app/templates/Identifiers/columns.inc | 16 +- app/templates/Identifiers/fields-nav.inc | 35 +++ app/templates/Names/columns.inc | 6 + app/templates/People/fields.inc | 124 -------- app/templates/PersonRoles/columns.inc | 5 + app/templates/Standard/add-edit-view.php | 37 ++- app/templates/Standard/index.php | 29 +- app/templates/TelephoneNumbers/columns.inc | 6 + app/templates/TelephoneNumbers/fields-nav.inc | 35 +++ app/templates/Urls/columns.inc | 6 + app/templates/Urls/fields-nav.inc | 35 +++ app/templates/element/datePicker.php | 26 ++ app/templates/element/subnavigation.php | 266 ++++++++++++++++++ app/webroot/css/co-base.css | 20 +- 29 files changed, 706 insertions(+), 157 deletions(-) create mode 100644 app/templates/AdHocAttributes/fields-nav.inc create mode 100644 app/templates/Addresses/fields-nav.inc create mode 100644 app/templates/EmailAddresses/fields-nav.inc rename app/templates/{Groups => GroupMembers}/fields-nav.inc (81%) create mode 100644 app/templates/GroupNestings/fields-nav.inc create mode 100644 app/templates/Identifiers/fields-nav.inc create mode 100644 app/templates/TelephoneNumbers/fields-nav.inc create mode 100644 app/templates/Urls/fields-nav.inc create mode 100644 app/templates/element/subnavigation.php diff --git a/app/resources/locales/en_US/menu.po b/app/resources/locales/en_US/menu.po index 2376b0bf2..f8884c6bc 100644 --- a/app/resources/locales/en_US/menu.po +++ b/app/resources/locales/en_US/menu.po @@ -24,6 +24,9 @@ # Menu Messages +msgid "co.Attributes" +msgstr "Attributes" + msgid "co.configuration" msgstr "Config" diff --git a/app/src/Controller/MVEAController.php b/app/src/Controller/MVEAController.php index 2f2323f9e..7a5fb97f0 100644 --- a/app/src/Controller/MVEAController.php +++ b/app/src/Controller/MVEAController.php @@ -81,7 +81,9 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_ei_id', $externalIdentity->id); // What's the primary name of the Person? - $this->set('vv_person_name', $Names->primaryName($externalIdentity->person_id)); + $personName = $Names->primaryName($externalIdentity->person_id); + $this->set('vv_person_name', $personName); + $this->set('vv_supertitle', $personName->full_name); $this->set('vv_person_id', $externalIdentity->person_id); break; case 'person_role_id': @@ -92,11 +94,15 @@ public function beforeRender(\Cake\Event\EventInterface $event) { $this->set('vv_person_role_id', $link->value); // Also set a name - $this->set('vv_person_name', $Names->primaryName($roleEntity->person_id)); + $personName = $Names->primaryName($roleEntity->person_id); + $this->set('vv_person_name', $personName); + $this->set('vv_supertitle', $personName->full_name); $this->set('vv_person_id', $roleEntity->person_id); break; case 'person_id': - $this->set('vv_person_name', $Names->primaryName((int)$link->value)); + $personName = $Names->primaryName((int)$link->value); + $this->set('vv_person_name', $personName); + $this->set('vv_supertitle', $personName->full_name); $this->set('vv_person_id', $link->value); break; default; diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index 4bf4fea62..d28792885 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -97,6 +97,12 @@ public function add() { // Default title is add new object $this->set('vv_title', __d('operation', 'add.a', __d('controller', $modelsName, [1]))); + + // Supertitle is normally the display name of the parent object when subnavigation exists. + // Set this here as the fallback default. This value is overriden in MVEAController to hold the + // name of the parent object, not the model name of the current object. + // TODO: set this to a better value for other kinds of child objects (e.g. Group member) + $this->set('vv_supertitle', __d('controller', $modelsName, [1])); // Let the view render $this->render('/Standard/add-edit-view'); @@ -322,6 +328,7 @@ public function edit(string $id) { // We don't use a trait for this since each table will implement different logic $this->set('vv_title', __d('operation', 'edit.ai', $table->generateDisplayField($obj))); + $this->set('vv_supertitle', $table->generateDisplayField($obj)); } else { // Default view title is edit object display field $field = $table->getDisplayField(); diff --git a/app/templates/AdHocAttributes/columns.inc b/app/templates/AdHocAttributes/columns.inc index 335fb303c..dd2f93b61 100644 --- a/app/templates/AdHocAttributes/columns.inc +++ b/app/templates/AdHocAttributes/columns.inc @@ -37,4 +37,10 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'ad_hoc_attributes' ]; \ No newline at end of file diff --git a/app/templates/AdHocAttributes/fields-nav.inc b/app/templates/AdHocAttributes/fields-nav.inc new file mode 100644 index 000000000..8cddfe107 --- /dev/null +++ b/app/templates/AdHocAttributes/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'ad_hoc_attributes' +]; \ No newline at end of file diff --git a/app/templates/Addresses/columns.inc b/app/templates/Addresses/columns.inc index 50ea05056..257f4b097 100644 --- a/app/templates/Addresses/columns.inc +++ b/app/templates/Addresses/columns.inc @@ -42,3 +42,9 @@ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true ]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'addresses' +]; diff --git a/app/templates/Addresses/fields-nav.inc b/app/templates/Addresses/fields-nav.inc new file mode 100644 index 000000000..08574e5a4 --- /dev/null +++ b/app/templates/Addresses/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'addresses' +]; \ No newline at end of file diff --git a/app/templates/EmailAddresses/columns.inc b/app/templates/EmailAddresses/columns.inc index 0af877b80..da915ca19 100644 --- a/app/templates/EmailAddresses/columns.inc +++ b/app/templates/EmailAddresses/columns.inc @@ -37,4 +37,10 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'email_addresses' ]; \ No newline at end of file diff --git a/app/templates/EmailAddresses/fields-nav.inc b/app/templates/EmailAddresses/fields-nav.inc new file mode 100644 index 000000000..157ea46fc --- /dev/null +++ b/app/templates/EmailAddresses/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'email_addresses' +]; \ No newline at end of file diff --git a/app/templates/ExternalIdentities/columns.inc b/app/templates/ExternalIdentities/columns.inc index d7482c7ee..9bdce03a2 100644 --- a/app/templates/ExternalIdentities/columns.inc +++ b/app/templates/ExternalIdentities/columns.inc @@ -40,4 +40,9 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'external_identities' ]; \ No newline at end of file diff --git a/app/templates/GroupMembers/columns.inc b/app/templates/GroupMembers/columns.inc index b1d33928b..4faec634b 100644 --- a/app/templates/GroupMembers/columns.inc +++ b/app/templates/GroupMembers/columns.inc @@ -60,4 +60,9 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'group', + 'active' => 'members' ]; \ No newline at end of file diff --git a/app/templates/Groups/fields-nav.inc b/app/templates/GroupMembers/fields-nav.inc similarity index 81% rename from app/templates/Groups/fields-nav.inc rename to app/templates/GroupMembers/fields-nav.inc index 38d21495f..1dba6bd0e 100644 --- a/app/templates/Groups/fields-nav.inc +++ b/app/templates/GroupMembers/fields-nav.inc @@ -1,6 +1,6 @@ 'sync', - 'order' => 'Default', - 'label' => __d('operation', 'reconcile'), - 'link' => [ - 'action' => 'reconcile' - ], - 'class' => '' - ] +// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of this file into fields.inc +$topLinks = []; + +$subnav = [ + 'name' => 'group', + 'active' => 'members' ]; \ No newline at end of file diff --git a/app/templates/GroupNestings/columns.inc b/app/templates/GroupNestings/columns.inc index 2fa1abbfb..014c4cec8 100644 --- a/app/templates/GroupNestings/columns.inc +++ b/app/templates/GroupNestings/columns.inc @@ -37,4 +37,9 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'group', + 'active' => 'nestings' ]; \ No newline at end of file diff --git a/app/templates/GroupNestings/fields-nav.inc b/app/templates/GroupNestings/fields-nav.inc new file mode 100644 index 000000000..1374feaae --- /dev/null +++ b/app/templates/GroupNestings/fields-nav.inc @@ -0,0 +1,34 @@ + 'group', + 'active' => 'nestings' +]; \ No newline at end of file diff --git a/app/templates/GroupOwners/columns.inc b/app/templates/GroupOwners/columns.inc index e65333f78..efb861e28 100644 --- a/app/templates/GroupOwners/columns.inc +++ b/app/templates/GroupOwners/columns.inc @@ -39,4 +39,9 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'group', + 'active' => 'owners' ]; \ No newline at end of file diff --git a/app/templates/Identifiers/columns.inc b/app/templates/Identifiers/columns.inc index 1eb1d552e..48c82927c 100644 --- a/app/templates/Identifiers/columns.inc +++ b/app/templates/Identifiers/columns.inc @@ -34,11 +34,6 @@ $indexColumns = [ ] ]; -$bulkActions = [ - // TODO: develop bulk actions. For now, use a placeholder. - 'delete' => true -]; - $indexActions = [ [ 'controller' => 'authentication_events', @@ -52,4 +47,15 @@ $indexActions = [ ]; } ] +]; + +$bulkActions = [ + // TODO: develop bulk actions. For now, use a placeholder. + 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'identifiers' ]; \ No newline at end of file diff --git a/app/templates/Identifiers/fields-nav.inc b/app/templates/Identifiers/fields-nav.inc new file mode 100644 index 000000000..bcacd714f --- /dev/null +++ b/app/templates/Identifiers/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'identifiers' +]; \ No newline at end of file diff --git a/app/templates/Names/columns.inc b/app/templates/Names/columns.inc index 0e648e3d4..feeda0cd5 100644 --- a/app/templates/Names/columns.inc +++ b/app/templates/Names/columns.inc @@ -54,4 +54,10 @@ $rowActions = [ // TODO: develop bulk actions. For now, use a placeholder. $bulkActions = [ 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'names' ]; \ No newline at end of file diff --git a/app/templates/People/fields.inc b/app/templates/People/fields.inc index 9c864588a..4bdb5b69e 100644 --- a/app/templates/People/fields.inc +++ b/app/templates/People/fields.inc @@ -46,130 +46,6 @@ if($vv_action == 'add') { 'names.0.primary_name' => true ]; } elseif($vv_action == 'edit') { - // XXX This is a placeholder for canvas... maybe it should become a separate page - // rather than overload fields.inc? - - print $this->Html->link( - __d('controller', 'Names', [99]), - [ 'controller' => 'names', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'EmailAddresses', [99]), - [ 'controller' => 'email_addresses', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'Identifiers', [99]), - [ 'controller' => 'identifiers', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'PersonRoles', [99]), - [ 'controller' => 'person_roles', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'HistoryRecords', [99]), - [ 'controller' => 'history_records', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'AdHocAttributes', [99]), - [ 'controller' => 'ad_hoc_attributes', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'Addresses', [99]), - [ 'controller' => 'addresses', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'TelephoneNumbers', [99]), - [ 'controller' => 'telephone_numbers', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'Urls', [99]), - [ 'controller' => 'urls', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'Pronouns', [99]), - [ 'controller' => 'pronouns', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - - print $this->Html->link( - __d('controller', 'ExternalIdentities', [99]), - [ 'controller' => 'external-identities', - 'action' => 'index', - '?' => [ - 'person_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] - ); - $a = $vv_obj->extract(['person_role_id', 'person_id']); } diff --git a/app/templates/PersonRoles/columns.inc b/app/templates/PersonRoles/columns.inc index 1637e09e7..17fc028ea 100644 --- a/app/templates/PersonRoles/columns.inc +++ b/app/templates/PersonRoles/columns.inc @@ -51,4 +51,9 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'person_roles' ]; \ 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 abb41d9a4..ffae2843c 100644 --- a/app/templates/Standard/add-edit-view.php +++ b/app/templates/Standard/add-edit-view.php @@ -37,9 +37,10 @@ // 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') { +// Include subnavigation structures on add/edit/view pages +// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of fields-nav.inc into fields.inc +// When subnav exists, include on all Edit views and on Add/View for items with a parent. +if($vv_action == 'edit' || !empty($vv_bc_parent_obj) || !empty($vv_primary_link_id)) { if(file_exists(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc")) { include(ROOT . DS . "templates" . DS . $modelsName . DS . "fields-nav.inc"); } @@ -51,11 +52,30 @@ if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { $linkFilter = [$vv_primary_link => $this->request->getQuery($vv_primary_link)]; } - ?> -
+ + + + + +
-

+ +

+ +

+
id; foreach(($topLinks ?? []) as $t) { - if($vv_permissions[ $t['link']['action'] ]) { + // TODO: fix the following test so that cross-model links can exist in top-links (e.g. History Records index) + //if($vv_permissions[ $t['link']['action'] ]) { // We need to inject $linkFilter, but not overwrite any existing query params if(!empty($t['link']['?'])) { $t['link']['?'] = array_merge($t['link']['?'], $linkFilter); @@ -77,7 +98,7 @@ 'url' => $this->Url->build($t['link']), 'label' => $t['label'], ]; - } + //} } // Delete diff --git a/app/templates/Standard/index.php b/app/templates/Standard/index.php index 25b49e8d9..0c06082d1 100644 --- a/app/templates/Standard/index.php +++ b/app/templates/Standard/index.php @@ -58,11 +58,30 @@ if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { $linkFilter = [$vv_primary_link => $this->request->getQuery($vv_primary_link)]; } - ?> -
+ + + + + +
-

+ +

+ +

+
id; - // Insert actions as per the .inc file - // TODO: create an element or move this to MenuHelper so it can be used by topLinks as well as actions + // Insert actions as per the .inc file + // TODO: create an element or move this to MenuHelper so it can be used by topLinks as well as actions $actionOrderDefault = $this->Menu->getMenuOrder('Default'); foreach($rowActions as $a) { $ok = false; diff --git a/app/templates/TelephoneNumbers/columns.inc b/app/templates/TelephoneNumbers/columns.inc index a8916b276..55289a091 100644 --- a/app/templates/TelephoneNumbers/columns.inc +++ b/app/templates/TelephoneNumbers/columns.inc @@ -37,4 +37,10 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'telephone_numbers' ]; \ No newline at end of file diff --git a/app/templates/TelephoneNumbers/fields-nav.inc b/app/templates/TelephoneNumbers/fields-nav.inc new file mode 100644 index 000000000..267ae0281 --- /dev/null +++ b/app/templates/TelephoneNumbers/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'telephone_numbers' +]; \ No newline at end of file diff --git a/app/templates/Urls/columns.inc b/app/templates/Urls/columns.inc index f7a32778e..5790bff73 100644 --- a/app/templates/Urls/columns.inc +++ b/app/templates/Urls/columns.inc @@ -37,4 +37,10 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'urls' ]; \ No newline at end of file diff --git a/app/templates/Urls/fields-nav.inc b/app/templates/Urls/fields-nav.inc new file mode 100644 index 000000000..8e2ef8f47 --- /dev/null +++ b/app/templates/Urls/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'names' +]; \ No newline at end of file diff --git a/app/templates/element/datePicker.php b/app/templates/element/datePicker.php index e04bc9b0e..7d25f5d20 100644 --- a/app/templates/element/datePicker.php +++ b/app/templates/element/datePicker.php @@ -1,4 +1,30 @@ request->getQuery($vv_primary_link))) { + // This will work for most index views + $curId = $this->request->getQuery($vv_primary_link); + $linkFilter = [$vv_primary_link => $curId]; +} elseif (!empty($vv_obj)) { + // This will work for most edit views + // XXX we might produce the $vv_primary_link for edit views so this approach could be deprecated + $curId = $vv_obj->id; + if(!empty($vv_primary_link_id)) { + $curId = $vv_primary_link_id; + } + if ($name == 'person') { + $linkFilter = ['person_id' => $curId]; + } + if ($name == 'group') { + $linkFilter = ['group_id' => $curId]; + } +} +?> + + + + + + \ No newline at end of file diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 4d5eab282..99d944280 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -527,7 +527,7 @@ ul.form-list li.alert-banner .co-alert { font-size: 0.9em; margin-top: -1em; } -.titleNavContainer { +.pageTitleContainer { display: flex; justify-content: space-between; margin: 1em 0 0.5em; @@ -536,6 +536,9 @@ ul.form-list li.alert-banner .co-alert { .pageTitle { padding-bottom: 0.25em; } +.pageTitle h2 { + line-height: 1.2em; +} .pageTitle .deleted, .pageTitle .archived { background-color: var(--cmg-color-red-003); @@ -550,6 +553,21 @@ ul.form-list li.alert-banner .co-alert { .pageTitle .archived { background-color: var(--cmg-color-gray-003); } +/* SUBNAVIGATION & TABS */ +.supertitle { + padding: 1em 0; +} +#subnavigation nav { + padding: 0.5em 0; +} +.cm-subnav-tabs .nav-link { + text-transform: uppercase; + padding: 1em 1.5em; + color: var(--cmg-color-blue-001); +} +.cm-subnav-links .nav-link.active { + color: var(--cmg-color-gray-001); +} /* INNER CONTENT - for non-table-based layouts */ #content { padding: 2rem; From 265929d741e974f2256081d6727ad38ee28d55fd Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Tue, 11 Oct 2022 12:34:00 -0400 Subject: [PATCH 2/7] Add more submenu files (CFM-192) --- app/templates/GroupOwners/fields-nav.inc | 34 ++++++++++++++ app/templates/Groups/fields-nav.inc | 56 ++++++++++++++++++++++++ app/templates/Names/fields-nav.inc | 35 +++++++++++++++ app/templates/People/fields-nav.inc | 48 ++++++++++++++++++++ app/templates/PersonRoles/fields-nav.inc | 34 ++++++++++++++ 5 files changed, 207 insertions(+) create mode 100644 app/templates/GroupOwners/fields-nav.inc create mode 100644 app/templates/Groups/fields-nav.inc create mode 100644 app/templates/Names/fields-nav.inc create mode 100644 app/templates/People/fields-nav.inc create mode 100644 app/templates/PersonRoles/fields-nav.inc diff --git a/app/templates/GroupOwners/fields-nav.inc b/app/templates/GroupOwners/fields-nav.inc new file mode 100644 index 000000000..d0dbed97b --- /dev/null +++ b/app/templates/GroupOwners/fields-nav.inc @@ -0,0 +1,34 @@ + 'group', + 'active' => 'owners' +]; \ No newline at end of file diff --git a/app/templates/Groups/fields-nav.inc b/app/templates/Groups/fields-nav.inc new file mode 100644 index 000000000..8f563a9fe --- /dev/null +++ b/app/templates/Groups/fields-nav.inc @@ -0,0 +1,56 @@ + 'sync', + 'order' => 'Default', + 'label' => __d('operation', 'reconcile'), + 'link' => [ + 'action' => 'reconcile', + $vv_obj->id + ], + 'class' => '' + ], + [ + 'icon' => 'history', + 'order' => 'Default', + 'label' => __d('operation', 'HistoryRecords'), + 'link' => [ + 'controller' => 'history_records', + 'action' => 'index', + '?' => ['group_id' => $vv_obj->id] + ], + 'class' => '' + ] +]; + +$subnav = [ + 'name' => 'group', + 'active' => 'properties' +]; \ No newline at end of file diff --git a/app/templates/Names/fields-nav.inc b/app/templates/Names/fields-nav.inc new file mode 100644 index 000000000..d333f8830 --- /dev/null +++ b/app/templates/Names/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'names' +]; \ No newline at end of file diff --git a/app/templates/People/fields-nav.inc b/app/templates/People/fields-nav.inc new file mode 100644 index 000000000..e54aef215 --- /dev/null +++ b/app/templates/People/fields-nav.inc @@ -0,0 +1,48 @@ + 'history', + 'order' => 'Default', + 'label' => __d('operation', 'HistoryRecords'), + 'link' => [ + 'controller' => 'history_records', + 'action' => 'index', + '?' => [ + 'person_id' => $vv_obj->id + ] + ], + 'class' => '' + ] +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'properties' +]; \ No newline at end of file diff --git a/app/templates/PersonRoles/fields-nav.inc b/app/templates/PersonRoles/fields-nav.inc new file mode 100644 index 000000000..11932601d --- /dev/null +++ b/app/templates/PersonRoles/fields-nav.inc @@ -0,0 +1,34 @@ + 'person', + 'active' => 'person_roles' +]; \ No newline at end of file From 49d2d767d0fe0f251dd47dc83aa17ad6ac0f0d24 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 24 Oct 2022 16:26:31 -0400 Subject: [PATCH 3/7] Submenus working for People, Person-Roles, External Identities, and External Identity Roles (CFM-192) --- app/resources/locales/en_US/information.po | 3 + app/src/Controller/StandardController.php | 2 + app/templates/EmailAddresses/fields-nav.inc | 2 +- .../ExternalIdentities/fields-nav.inc | 35 ++ .../ExternalIdentityRoles/columns.inc | 6 + .../ExternalIdentityRoles/fields-nav.inc | 35 ++ app/templates/PersonRoles/fields-nav.inc | 3 +- app/templates/Standard/add-edit-view.php | 13 +- app/templates/Standard/index.php | 10 +- app/templates/element/subnavigation.php | 381 +++++++++++++++--- app/webroot/css/co-base.css | 24 +- 11 files changed, 441 insertions(+), 73 deletions(-) create mode 100644 app/templates/ExternalIdentities/fields-nav.inc create mode 100644 app/templates/ExternalIdentityRoles/fields-nav.inc diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index dba961a1a..fa0fe170c 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -56,3 +56,6 @@ msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" msgid "global.records.none" msgstr "There are no records to display." + +msgid "global.title.none" +msgstr "No title" diff --git a/app/src/Controller/StandardController.php b/app/src/Controller/StandardController.php index d28792885..43685c882 100644 --- a/app/src/Controller/StandardController.php +++ b/app/src/Controller/StandardController.php @@ -329,6 +329,8 @@ public function edit(string $id) { $this->set('vv_title', __d('operation', 'edit.ai', $table->generateDisplayField($obj))); $this->set('vv_supertitle', $table->generateDisplayField($obj)); + // Pass the display field also into subtitle for dealing with External IDs + $this->set('vv_subtitle', $table->generateDisplayField($obj)); } else { // Default view title is edit object display field $field = $table->getDisplayField(); diff --git a/app/templates/EmailAddresses/fields-nav.inc b/app/templates/EmailAddresses/fields-nav.inc index 157ea46fc..14b677975 100644 --- a/app/templates/EmailAddresses/fields-nav.inc +++ b/app/templates/EmailAddresses/fields-nav.inc @@ -30,6 +30,6 @@ $topLinks = []; $subnav = [ 'name' => 'person', - 'active' => 'attributes', + 'active' => 'attributes', // default for person. 'external identities' are special cased 'subActive' => 'email_addresses' ]; \ No newline at end of file diff --git a/app/templates/ExternalIdentities/fields-nav.inc b/app/templates/ExternalIdentities/fields-nav.inc new file mode 100644 index 000000000..569827598 --- /dev/null +++ b/app/templates/ExternalIdentities/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'external_identities', + 'subActive' => 'properties' +]; \ No newline at end of file diff --git a/app/templates/ExternalIdentityRoles/columns.inc b/app/templates/ExternalIdentityRoles/columns.inc index 72d853f16..a911ae50b 100644 --- a/app/templates/ExternalIdentityRoles/columns.inc +++ b/app/templates/ExternalIdentityRoles/columns.inc @@ -44,6 +44,12 @@ $indexColumns = [ ] ]; +$subnav = [ + 'name' => 'person', + 'active' => 'external_identities', + 'subActive' => 'external_identity_roles' +]; + $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true diff --git a/app/templates/ExternalIdentityRoles/fields-nav.inc b/app/templates/ExternalIdentityRoles/fields-nav.inc new file mode 100644 index 000000000..9b766b90b --- /dev/null +++ b/app/templates/ExternalIdentityRoles/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'external_identities', + 'subActive' => 'external_identity_roles' +]; \ No newline at end of file diff --git a/app/templates/PersonRoles/fields-nav.inc b/app/templates/PersonRoles/fields-nav.inc index 11932601d..e306f822c 100644 --- a/app/templates/PersonRoles/fields-nav.inc +++ b/app/templates/PersonRoles/fields-nav.inc @@ -30,5 +30,6 @@ $topLinks = []; $subnav = [ 'name' => 'person', - 'active' => 'person_roles' + 'active' => 'person_roles', + 'subActive' => 'properties' ]; \ 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 ffae2843c..cce8353c9 100644 --- a/app/templates/Standard/add-edit-view.php +++ b/app/templates/Standard/add-edit-view.php @@ -74,7 +74,18 @@

-

+ request->getParam('controller') == 'PersonRoles' + || $this->request->getParam('controller') == 'ExternalIdentities' + || $this->request->getParam('controller') == 'ExternalIdentityRoles'): ?> +

+ +

+

-

+ +

+ +

+
diff --git a/app/templates/element/subnavigation.php b/app/templates/element/subnavigation.php index f30a37277..93b9088b8 100644 --- a/app/templates/element/subnavigation.php +++ b/app/templates/element/subnavigation.php @@ -24,38 +24,92 @@ * @since COmanage Registry v5.0.0 * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ +use Cake\View\Helper; $linkFilter = []; $curId = NULL; +$curController = $this->request->getParam('controller'); +$curAction = $this->request->getParam('action'); if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { // This will work for most index views $curId = $this->request->getQuery($vv_primary_link); $linkFilter = [$vv_primary_link => $curId]; + // For top-level nav + if(!empty($vv_person_id)) { + $curId = $vv_person_id; + $linkFilter = ['person_id' => $vv_person_id]; + } } elseif (!empty($vv_obj)) { - // This will work for most edit views - // XXX we might produce the $vv_primary_link for edit views so this approach could be deprecated + // This will work for most top-level edit views + // XXX we might produce the $vv_primary_link for edit views so the approach below could be deprecated $curId = $vv_obj->id; + if(!empty($vv_person_id)) { + $curId = $vv_person_id; + } else if(!empty($vv_primary_link_id)) { $curId = $vv_primary_link_id; } + // For top-level nav if ($name == 'person') { $linkFilter = ['person_id' => $curId]; - } - if ($name == 'group') { + } elseif ($name == 'group') { $linkFilter = ['group_id' => $curId]; } } -?> +// Simplify our tests for roles and external identifiers (in Person subnav) +$isPersonRole = ( + $vv_primary_link == 'person_role_id' + || $vv_primary_link == 'person_role_id' + || ($curController == 'PersonRoles' && ($curAction == 'edit' || $curAction == 'view')) +) ? true : false; + +$isExternalIdRole = ( + $vv_primary_link == 'external_identity_role_id' + || ($curController == 'ExternalIdentityRoles' && ($curAction == 'edit' || $curAction == 'view')) +) ? true : false; + +$isExternalId = ( + $vv_primary_link == 'external_identity_id' + || $vv_primary_link == 'external_identity_role_id' + || ($curController == 'ExternalIdentities' && ($curAction == 'edit' || $curAction == 'view')) + || ($curController == 'ExternalIdentityRoles' && ($curAction == 'edit' || $curAction == 'view')) +) ? true : false; + +?> + + - + + + request->getQuery($vv_primary_link); + if($isPersonRole || $isExternalId) { + if($isExternalId && !empty($vv_ei_id)) { + $curId = $vv_ei_id; + } + // We display the role or external identity name above the subnav to show the hierarchy. + // Use this branch to also set the second-level $linkFilter + print '

'; + if(!empty($vv_ei_name)) { + // We have an external identity name + print $vv_ei_name->full_name; + $linkFilter = ['external_identity_id' => $curId]; + } elseif(!empty($vv_person_role)) { + // We have a person role + print $vv_person_role; + $linkFilter = ['person_role_id' => $curId]; + } elseif(!empty($vv_obj)) { + // We are editing/viewing an object + if(!empty($vv_obj->title)) { + print $vv_obj->title; + } elseif (!empty($vv_subtitle)) { + print $vv_subtitle; + } else { + print print __d('information','global.title.none'); + } + // Set up $linkFilter for edit/view on Roles and External Identities + $curId = $vv_obj->id; + if($curController == 'PersonRoles') { + $linkFilter = ['person_role_id' => $curId]; + } + if($curController == 'ExternalIdentities') { + $linkFilter = ['external_identity_id' => $curId]; + } + if($curController == 'ExternalIdentityRoles') { + $linkFilter = ['external_identity_role_id' => $curId]; + } + } else { + // We shouldn't get here, but have a deafult in case. + print __d('information','global.title.none'); + } + print '

'; + } + ?> + + +
+

+ request->getQuery($vv_primary_link); + if(!empty($vv_obj)) { + $curId = $vv_obj->id; + } + $linkFilter = ['external_identity_role_id' => $curId]; + + if(!empty($vv_ei_role)) { + print $vv_ei_role; + } elseif(!empty($vv_obj->title)) { + print $vv_obj->title; + } else { + // As above, we shouldn't get here, but have a deafult in case. + print __d('information','global.title.none'); + } + ?> +

+ +
+ \ No newline at end of file diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 99d944280..640734aa4 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -54,8 +54,8 @@ h2 { margin: 0; } h3 { - font-size: 1.6em; - line-height: 1.6em; + font-size: 1.4em; + line-height: 1.4em; margin: 0; } a { @@ -568,6 +568,26 @@ ul.form-list li.alert-banner .co-alert { .cm-subnav-links .nav-link.active { color: var(--cmg-color-gray-001); } +.cm-subnav-links ul.list-inline { + margin: 0.5em 0 0 0; + font-size: 0.9em; +} +.cm-subnav-links .list-inline-item { + margin: 0; +} +.cm-subnav-links .list-inline-item a.nav-link { + padding: 0 1.5em 0.5em 0; +} +#external-id-role { + border-top: 1px solid var(--cmg-color-lightgray-006); +} +#external-id-role h3 { + padding: 0.5rem 1rem; + background-color: var(--cmg-color-lightgray-003); +} +#external-id-role-nav { + margin-left: 1rem; +} /* INNER CONTENT - for non-table-based layouts */ #content { padding: 2rem; From e1d1d44dfebb063b10c93bc53fc7ceb1df23d746 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 24 Oct 2022 16:51:48 -0400 Subject: [PATCH 4/7] Clean up subnavigation logic and remove hard-coded links from Roles and External Identities (CFM-192) --- app/templates/ExternalIdentities/fields.inc | 112 ------------------ .../ExternalIdentityRoles/fields.inc | 36 ------ app/templates/PersonRoles/fields.inc | 36 ------ app/templates/element/subnavigation.php | 73 ++++++------ 4 files changed, 38 insertions(+), 219 deletions(-) diff --git a/app/templates/ExternalIdentities/fields.inc b/app/templates/ExternalIdentities/fields.inc index 43c4632d0..45904c2a1 100644 --- a/app/templates/ExternalIdentities/fields.inc +++ b/app/templates/ExternalIdentities/fields.inc @@ -32,115 +32,3 @@ if($vv_action == 'add' || $vv_action == 'edit') { print $this->Field->dateControl('date_of_birth', \App\Lib\Enum\DateTypeEnum::DateOnly); } - -// XXX This is a placeholder for canvas... maybe it should become a separate page -// rather than overload fields.inc? - -print $this->Html->link( - __d('controller', 'Names', [99]), - [ 'controller' => 'names', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'EmailAddresses', [99]), - [ 'controller' => 'email_addresses', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'Identifiers', [99]), - [ 'controller' => 'identifiers', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'ExternalIdentityRoles', [99]), - [ 'controller' => 'external_identity_roles', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'HistoryRecords', [99]), - [ 'controller' => 'history_records', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'AdHocAttributes', [99]), - [ 'controller' => 'ad_hoc_attributes', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); -print $this->Html->link( - __d('controller', 'Addresses', [99]), - [ 'controller' => 'addresses', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'TelephoneNumbers', [99]), - [ 'controller' => 'telephone_numbers', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'Urls', [99]), - [ 'controller' => 'urls', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'Pronouns', [99]), - [ 'controller' => 'pronouns', - 'action' => 'index', - '?' => [ - 'external_identity_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); diff --git a/app/templates/ExternalIdentityRoles/fields.inc b/app/templates/ExternalIdentityRoles/fields.inc index 15e98947a..e0d159178 100644 --- a/app/templates/ExternalIdentityRoles/fields.inc +++ b/app/templates/ExternalIdentityRoles/fields.inc @@ -48,39 +48,3 @@ if($vv_action == 'add' || $vv_action == 'edit') { print $this->Field->dateControl('valid_through'); } - -// XXX This is a placeholder for canvas... maybe it should become a separate page -// rather than overload fields.inc? - -print $this->Html->link( - __d('controller', 'AdHocAttributes', [99]), - [ 'controller' => 'ad_hoc_attributes', - 'action' => 'index', - '?' => [ - 'external_identity_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'Addresses', [99]), - [ 'controller' => 'addresses', - 'action' => 'index', - '?' => [ - 'external_identity_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'TelephoneNumbers', [99]), - [ 'controller' => 'telephone_numbers', - 'action' => 'index', - '?' => [ - 'external_identity_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); diff --git a/app/templates/PersonRoles/fields.inc b/app/templates/PersonRoles/fields.inc index af8ad74bc..749952f73 100644 --- a/app/templates/PersonRoles/fields.inc +++ b/app/templates/PersonRoles/fields.inc @@ -61,39 +61,3 @@ if($vv_action == 'add' || $vv_action == 'edit') { print $this->Field->dateControl('valid_through'); } - -// XXX This is a placeholder for canvas... maybe it should become a separate page -// rather than overload fields.inc? - -print $this->Html->link( - __d('controller', 'AdHocAttributes', [99]), - [ 'controller' => 'ad_hoc_attributes', - 'action' => 'index', - '?' => [ - 'person_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'Addresses', [99]), - [ 'controller' => 'addresses', - 'action' => 'index', - '?' => [ - 'person_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); - -print $this->Html->link( - __d('controller', 'TelephoneNumbers', [99]), - [ 'controller' => 'telephone_numbers', - 'action' => 'index', - '?' => [ - 'person_role_id' => $vv_obj->id - ] - ], - ['class' => 'linkbutton'] -); diff --git a/app/templates/element/subnavigation.php b/app/templates/element/subnavigation.php index 93b9088b8..95378327c 100644 --- a/app/templates/element/subnavigation.php +++ b/app/templates/element/subnavigation.php @@ -23,6 +23,10 @@ * @package registry * @since COmanage Registry v5.0.0 * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) +* +* The subnavigation is structured in first, second, and third level blocks. +* Only External Identity Roles have a third-level of navigation. +* */ use Cake\View\Helper; @@ -32,7 +36,7 @@ $curAction = $this->request->getParam('action'); if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { - // This will work for most index views + // This will work for most top-level index views $curId = $this->request->getQuery($vv_primary_link); $linkFilter = [$vv_primary_link => $curId]; // For top-level nav @@ -46,37 +50,16 @@ $curId = $vv_obj->id; if(!empty($vv_person_id)) { $curId = $vv_person_id; - } else - if(!empty($vv_primary_link_id)) { + } elseif(!empty($vv_primary_link_id)) { $curId = $vv_primary_link_id; } - // For top-level nav + // For top-level nav while in edit pages. if ($name == 'person') { $linkFilter = ['person_id' => $curId]; } elseif ($name == 'group') { $linkFilter = ['group_id' => $curId]; } } - -// Simplify our tests for roles and external identifiers (in Person subnav) -$isPersonRole = ( - $vv_primary_link == 'person_role_id' - || $vv_primary_link == 'person_role_id' - || ($curController == 'PersonRoles' && ($curAction == 'edit' || $curAction == 'view')) -) ? true : false; - -$isExternalIdRole = ( - $vv_primary_link == 'external_identity_role_id' - || ($curController == 'ExternalIdentityRoles' && ($curAction == 'edit' || $curAction == 'view')) -) ? true : false; - -$isExternalId = ( - $vv_primary_link == 'external_identity_id' - || $vv_primary_link == 'external_identity_role_id' - || ($curController == 'ExternalIdentities' && ($curAction == 'edit' || $curAction == 'view')) - || ($curController == 'ExternalIdentityRoles' && ($curAction == 'edit' || $curAction == 'view')) -) ? true : false; - ?> @@ -84,8 +67,27 @@ + - +

Html->link( __d('controller', 'Properties', [99]), [ 'controller' => 'external-identity-roles', From da1c96ee3abbaeca20cafa440274e5c418998155 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 24 Oct 2022 17:15:24 -0400 Subject: [PATCH 5/7] Fix subnavigation for External Identity Roles in sub-entity edit views (CFM-192) --- app/templates/element/subnavigation.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/templates/element/subnavigation.php b/app/templates/element/subnavigation.php index 95378327c..049c5d07a 100644 --- a/app/templates/element/subnavigation.php +++ b/app/templates/element/subnavigation.php @@ -432,8 +432,8 @@

request->getQuery($vv_primary_link); - if(!empty($vv_obj)) { + $curId = $vv_primary_link_obj->id; + if(!empty($vv_obj) && ($curController == 'ExternalIdentityRoles' && ($curAction == 'edit' || $curAction == 'view'))) { $curId = $vv_obj->id; } $linkFilter = ['external_identity_role_id' => $curId]; From b1759e3f9221b01cc59c616bc9d02be37fd6b5c3 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 24 Oct 2022 17:41:11 -0400 Subject: [PATCH 6/7] Improve subnavigation Pronouns (CFM-192) --- app/templates/Pronouns/columns.inc | 6 +++++ app/templates/Pronouns/fields-nav.inc | 35 +++++++++++++++++++++++++ app/templates/element/subnavigation.php | 1 + 3 files changed, 42 insertions(+) create mode 100644 app/templates/Pronouns/fields-nav.inc diff --git a/app/templates/Pronouns/columns.inc b/app/templates/Pronouns/columns.inc index 92e6e3ddc..3963c2db5 100644 --- a/app/templates/Pronouns/columns.inc +++ b/app/templates/Pronouns/columns.inc @@ -41,4 +41,10 @@ $indexColumns = [ $bulkActions = [ // TODO: develop bulk actions. For now, use a placeholder. 'delete' => true +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'attributes', + 'subActive' => 'pronouns' ]; \ No newline at end of file diff --git a/app/templates/Pronouns/fields-nav.inc b/app/templates/Pronouns/fields-nav.inc new file mode 100644 index 000000000..ff7b40d0f --- /dev/null +++ b/app/templates/Pronouns/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'attributes', + 'subActive' => 'pronouns' +]; \ No newline at end of file diff --git a/app/templates/element/subnavigation.php b/app/templates/element/subnavigation.php index 049c5d07a..93fb928d4 100644 --- a/app/templates/element/subnavigation.php +++ b/app/templates/element/subnavigation.php @@ -411,6 +411,7 @@
  • Html->link( __d('controller', 'Pronouns', [99]), [ 'controller' => 'pronouns', From 497887e0a470ab745e3bc14b4eeeddf7756a818c Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Mon, 24 Oct 2022 17:50:27 -0400 Subject: [PATCH 7/7] Restore History Records link to External Identities (CFM-192) --- app/templates/ExternalIdentities/fields-nav.inc | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/templates/ExternalIdentities/fields-nav.inc b/app/templates/ExternalIdentities/fields-nav.inc index 569827598..6ffd1566c 100644 --- a/app/templates/ExternalIdentities/fields-nav.inc +++ b/app/templates/ExternalIdentities/fields-nav.inc @@ -26,7 +26,21 @@ */ // XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of this file into fields.inc -$topLinks = []; +$topLinks = [ + [ + 'icon' => 'history', + 'order' => 'Default', + 'label' => __d('operation', 'HistoryRecords'), + 'link' => [ + 'controller' => 'history_records', + 'action' => 'index', + '?' => [ + 'external_identity_id' => $vv_obj->id + ] + ], + 'class' => '' + ] +]; $subnav = [ 'name' => 'person',