Skip to content

Commit

Permalink
Submenus working for People, Person-Roles, External Identities, and E…
Browse files Browse the repository at this point in the history
…xternal Identity Roles (CFM-192)
  • Loading branch information
arlen committed Oct 24, 2022
1 parent 265929d commit 49d2d76
Show file tree
Hide file tree
Showing 11 changed files with 441 additions and 73 deletions.
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion app/templates/EmailAddresses/fields-nav.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ $topLinks = [];

$subnav = [
'name' => 'person',
'active' => 'attributes',
'active' => 'attributes', // default for person. 'external identities' are special cased
'subActive' => 'email_addresses'
];
35 changes: 35 additions & 0 deletions app/templates/ExternalIdentities/fields-nav.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* COmanage Registry External Identity Edit Navigation
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link https://www.internet2.edu/comanage COmanage Project
* @package registry
* @since COmanage Registry v5.0.0
* @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 = [];

$subnav = [
'name' => 'person',
'active' => 'external_identities',
'subActive' => 'properties'
];
6 changes: 6 additions & 0 deletions app/templates/ExternalIdentityRoles/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 35 additions & 0 deletions app/templates/ExternalIdentityRoles/fields-nav.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* COmanage Registry External Identity Roles Navigation
*
* Portions licensed to the University Corporation for Advanced Internet
* Development, Inc. ("UCAID") under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership.
*
* UCAID licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @link https://www.internet2.edu/comanage COmanage Project
* @package registry
* @since COmanage Registry v5.0.0
* @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 = [];

$subnav = [
'name' => 'person',
'active' => 'external_identities',
'subActive' => 'external_identity_roles'
];
3 changes: 2 additions & 1 deletion app/templates/PersonRoles/fields-nav.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@ $topLinks = [];

$subnav = [
'name' => 'person',
'active' => 'person_roles'
'active' => 'person_roles',
'subActive' => 'properties'
];
13 changes: 12 additions & 1 deletion app/templates/Standard/add-edit-view.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,18 @@
<?php if(empty($subnav)): ?>
<h1><?= $vv_title; ?></h1>
<?php else: ?>
<h2><?= $vv_title; ?></h2>
<?php if(
// Subnavigation contains an h2 for these entities
$vv_primary_link == 'person_role_id'
|| $vv_primary_link == 'external_identity_id'
|| $vv_primary_link == 'external_identity_role_id'
|| $this->request->getParam('controller') == 'PersonRoles'
|| $this->request->getParam('controller') == 'ExternalIdentities'
|| $this->request->getParam('controller') == 'ExternalIdentityRoles'): ?>
<h3><?= $vv_title; ?></h3>
<?php else: ?>
<h2><?= $vv_title; ?></h2>
<?php endif; ?>
<?php endif; ?>
</div>
<?php
Expand Down
10 changes: 9 additions & 1 deletion app/templates/Standard/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@
<?php if(empty($subnav)): ?>
<h1><?= $vv_title; ?></h1>
<?php else: ?>
<h2><?= $vv_title; ?></h2>
<?php if(
// Subnavigation contains an h2 for these entities
$vv_primary_link == 'person_role_id'
|| $vv_primary_link == 'external_identity_id'
|| $vv_primary_link == 'external_identity_role_id'): ?>
<h3><?= $vv_title; ?></h3>
<?php else: ?>
<h2><?= $vv_title; ?></h2>
<?php endif; ?>
<?php endif; ?>
</div>

Expand Down
Loading

0 comments on commit 49d2d76

Please sign in to comment.