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/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 ada067882..d5a994ce0 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,9 @@ 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)); + // 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/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..14b677975 --- /dev/null +++ b/app/templates/EmailAddresses/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + '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/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/ExternalIdentities/fields-nav.inc b/app/templates/ExternalIdentities/fields-nav.inc new file mode 100644 index 000000000..6ffd1566c --- /dev/null +++ b/app/templates/ExternalIdentities/fields-nav.inc @@ -0,0 +1,49 @@ + 'history', + 'order' => 'Default', + 'label' => __d('operation', 'HistoryRecords'), + 'link' => [ + 'controller' => 'history_records', + 'action' => 'index', + '?' => [ + 'external_identity_id' => $vv_obj->id + ] + ], + 'class' => '' + ] +]; + +$subnav = [ + 'name' => 'person', + 'active' => 'external_identities', + 'subActive' => 'properties' +]; \ No newline at end of file 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/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/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/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/GroupMembers/fields-nav.inc b/app/templates/GroupMembers/fields-nav.inc new file mode 100644 index 000000000..1dba6bd0e --- /dev/null +++ b/app/templates/GroupMembers/fields-nav.inc @@ -0,0 +1,34 @@ + '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/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 index 38d21495f..8f563a9fe 100644 --- a/app/templates/Groups/fields-nav.inc +++ b/app/templates/Groups/fields-nav.inc @@ -25,14 +25,32 @@ * @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) */ +// XXX: if CFM-218 (Make fields.inc configuration only) is accepted, move the contents of this file into fields.inc $topLinks = [ [ 'icon' => 'sync', 'order' => 'Default', 'label' => __d('operation', 'reconcile'), 'link' => [ - 'action' => 'reconcile' + '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/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/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/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/PersonRoles/fields-nav.inc b/app/templates/PersonRoles/fields-nav.inc new file mode 100644 index 000000000..e306f822c --- /dev/null +++ b/app/templates/PersonRoles/fields-nav.inc @@ -0,0 +1,35 @@ + 'person', + 'active' => 'person_roles', + 'subActive' => 'properties' +]; \ No newline at end of file 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/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/Standard/add-edit-view.php b/app/templates/Standard/add-edit-view.php index abb41d9a4..cce8353c9 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,41 @@ if(!empty($vv_primary_link) && !empty($this->request->getQuery($vv_primary_link))) { $linkFilter = [$vv_primary_link => $this->request->getQuery($vv_primary_link)]; } - ?> -