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',