Skip to content

First pass at cleaning up Petition view (CFM-31) #246

Merged
merged 7 commits into from Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/resources/locales/en_US/field.po
Expand Up @@ -116,6 +116,9 @@ msgstr "Ends at ({0})"
msgid "enrollee_email"
msgstr "Enrollee Email"

msgid "enrollee_identifier"
msgstr "Enrollee Identifier"

msgid "extension"
msgstr "Extension"

Expand Down Expand Up @@ -185,6 +188,9 @@ msgstr "Middle"
msgid "modifiable"
msgstr "Modifiable"

msgid "modified"
msgstr "Modified"

msgid "name"
msgstr "Name"

Expand Down
9 changes: 9 additions & 0 deletions app/resources/locales/en_US/information.po
Expand Up @@ -54,6 +54,9 @@ msgstr "not set"
msgid "pagination.format"
msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}"

msgid "enrollment.steps"
msgstr "Enrollment Steps"

msgid "ExternalIdentities.source"
msgstr "This External Identity was created from {0}."

Expand Down Expand Up @@ -105,6 +108,12 @@ msgstr "Additional History Records may be available via Petitions and Provisioni
msgid "pagination.format"
msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}"

msgid "petition.history"
msgstr "Petition History"

msgid "petition.information"
msgstr "Petition Information"

msgid "Petitions.pending"
msgstr "This Petition has now been assigned to someone else. There is no further action for you at this time."

Expand Down
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/operation.po
Expand Up @@ -288,6 +288,9 @@ msgstr "View {0}"
msgid "view.PersonRoles.a"
msgstr "View Role {0}"

msgid "view.Petitions.a"
msgstr "View Petition {0}"

msgid "view.ExternalIdentityRoles.a"
msgstr "View Role {0}"

5 changes: 4 additions & 1 deletion app/src/Lib/Util/StringUtilities.php
Expand Up @@ -201,7 +201,10 @@ public static function entityAndActionToTitle($entity,
$field = $linkTable->getDisplayField();

if(!empty($entity->$field)) {
$title = __d($domain, $msgId, $entity->$field);
$title = __d($domain, $msgIdOverride, $entity->$field);
if($msgIdOverride === $title) {
$title = __d($domain, $msgId, $entity->$field);
}
} else {
$title = __d($domain, $msgId, __d('controller', $modelsName, [1]));
}
Expand Down
3 changes: 2 additions & 1 deletion app/src/Model/Table/PetitionsTable.php
Expand Up @@ -110,7 +110,8 @@ public function initialize(array $config): void {
'EnrollmentFlows' => ['EnrollmentFlowSteps' => ['sort' => ['ordr' => 'ASC']]],
'EnrolleePeople' => ['PrimaryName' => ['foreignKey' => 'person_id']],
'PetitionerPeople' => ['PrimaryName' => ['foreignKey' => 'person_id']],
'PetitionStepResults'
'PetitionStepResults',
'PetitionHistoryRecords'
]);

$this->setAutoViewVars([
Expand Down
2 changes: 1 addition & 1 deletion app/templates/EnrollmentFlows/fields-nav.inc
Expand Up @@ -26,7 +26,7 @@
*/

$topLinks[] = [
'icon' => 'start',
'icon' => 'play_arrow',
'order' => 'Default',
'label' => __d('operation', 'EnrollmentFlows.start'),
'link' => [
Expand Down
4 changes: 2 additions & 2 deletions app/templates/Petitions/columns.inc
Expand Up @@ -86,8 +86,8 @@ $rowActions = [
'controller' => 'petitions',
'action' => 'resume',
'class' => '',
// XXX this icon is supposed to be "resume" but that doesn't appear to render
'icon' => 'start',
// XXX this icon can be "resume" if we switch to Material Symbols - see: CFM-404
'icon' => 'fast_forward',
'label' => __d('operation', 'resume'),
'if' => 'isResumable'
]
Expand Down
38 changes: 38 additions & 0 deletions app/templates/Petitions/fields-nav.inc
@@ -0,0 +1,38 @@
<?php
/**
* COmanage Registry Petition Links
*
* 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)
*/

$topLinks = [
[
'icon' => 'fast_forward',
'order' => 'Default',
'label' => __d('operation', 'resume'),
'link' => [
'action' => 'resume',
$vv_obj->id
]
]
];