Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions app/resources/locales/en_US/information.po
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,16 @@ msgid "People.delete.cluster"
msgstr "Account on {0}"

msgid "People.delete.hard"
msgstr "Performing a <a href=\"https://spaces.at.internet2.edu/x/ZwnfF\">hard delete</a> will physically remove all records from the database, including all <a href=\"https://spaces.at.internet2.edu/x/bwnfF\">Changelog Entries</a>. This operation cannot be undone, except by restoring from a backup."
msgstr "Performing a <a href=\"https://spaces.at.internet2.edu/x/ZwnfF\">hard delete</a> will physically remove the Person and associated records from the database, including all <a href=\"https://spaces.at.internet2.edu/x/bwnfF\">Changelog Entries</a>. This operation cannot be undone except by restoring from a backup."

msgid "People.delete.history.actor"
msgstr "{0} History Records(s) for which this Person is an Actor will be updated to have no Actor"
msgstr "{0} History Records(s) for which this Person is an Actor will be updated to have no Actor."

msgid "People.delete.history.job"
msgstr "{0} Job History Records(s) related to this Person will be updated to remove the link"
msgstr "{0} Job History Records(s) related to this Person will be updated to remove the link."

msgid "People.delete.person"
msgstr "Deleting this record will delete the complete Person record for <a href=\"{0}\">{1}</a> (Person ID {2}), including <a href=\"{3}\">history</a>"
msgstr "Deleting this record will delete the complete Person record for <a href=\"{0}\">{1}</a> (Person ID {2}), including <a href=\"{3}\">history</a>."

msgid "People.delete.ei"
msgstr "External Identity {0} from {1} (Source Key: {2})"
Expand All @@ -160,28 +160,31 @@ msgid "People.delete.ei.legacy"
msgstr "Legacy External Identity {0}"

msgid "People.delete.notifications.actor"
msgstr "{0} Notification(s) for which this Person is an Actor will be updated to have no Actor"
msgstr "{0} Notification(s) for which this Person is an Actor will be updated to have no Actor."

msgid "People.delete.notifications.recipient"
msgstr "{0} Notification(s) for which this Person is a Recipient will be updated"
msgstr "{0} Notification(s) for which this Person is a Recipient will be updated."

msgid "People.delete.notifications.resolver"
msgstr "{0} Notification(s) for which this Person is the Resolver will be updated to have no Resolver"
msgstr "{0} Notification(s) for which this Person is the Resolver will be updated to have no Resolver."

msgid "People.delete.petitions.history.actor"
msgstr "{0} Petition History Records(s) for which this Person is an Actor will be updated to have no Actor"
msgstr "{0} Petition History Records(s) for which this Person is an Actor will be updated to have no Actor."

msgid "People.delete.petitions.petitioner"
msgstr "{0} Petitions(s) for which this Person is the Petitioner will be updated to have no Petitioner"
msgstr "{0} Petitions(s) for which this Person is the Petitioner will be updated to have no Petitioner."

msgid "People.delete.role"
msgstr "Person Role {0}: (COU: {1}, Affiliation: {2}, Title: {3})"

msgid "People.delete.roles.manager"
msgstr "{0} Person Role(s) for which this Person is a Manager will be updated to have no Manager"
msgstr "{0} Person Role(s) for which this Person is a Manager will be updated to have no Manager."

msgid "People.delete.roles.sponsor"
msgstr "{0} Person Role(s) for which this Person is a Sponsor will be updated to have no Sponsor"
msgstr "{0} Person Role(s) for which this Person is a Sponsor will be updated to have no Sponsor."

msgid "People.delete.soft"
msgstr "Performing a <a href=\"https://spaces.at.internet2.edu/x/ZwnfF\">soft delete</a> will mark the Person and associated records as "deleted" and hide them from the user interface."

msgid "petition.history"
msgstr "Petition History"
Expand Down
9 changes: 9 additions & 0 deletions app/resources/locales/en_US/operation.po
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,19 @@ msgstr "Decline"
msgid "delete"
msgstr "Delete"

msgid "delete.a"
msgstr "Delete {0}?"

msgid "delete.confirm"
msgstr "Are you sure you want to delete this record ({0})?"

msgid "delete.confirm.title"
msgstr "Confirm Deletion"

msgid "delete.hard"
msgstr "Hard Delete"

msgid "delete.hard.perform"
msgstr "Perform Hard Delete"

msgid "delete.queue"
Expand All @@ -207,6 +213,9 @@ msgstr "Queue for Deletion"
msgid "delete.queue.confirm"
msgstr "Are you sure you want to schedule this record ({0}) for deletion?"

msgid "delete.soft"
msgstr "Soft Delete"

msgid "duplicate"
msgstr "Duplicate"

Expand Down
6 changes: 3 additions & 3 deletions app/src/Controller/Component/BreadcrumbComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,10 @@ public function injectPrimaryLink(
$linkTable = \Cake\ORM\TableRegistry::getTableLocator()->get($linkModelFqn);
$contain = $this->resolveContainList($linkTable, $mappedAction);

// Normalize attr (people_id → id when the attr matches the model’s own foreign key)
// Use the table alias for query building (avoid plugin-qualified names in SQL)
$modelAlias = $linkTable->getAlias();
$foreignKey = StringUtilities::classNameToForeignKey($modelAlias);
$linkAttr = ($link->attr === $foreignKey) ? 'id' : $link->attr;

$linkAttr = (string)$linkTable->getPrimaryKey();

// Fetch the linked entity; if not found, handle gracefully
$linkedEntity = $linkTable
Expand Down
12 changes: 10 additions & 2 deletions app/src/Controller/PeopleController.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,17 @@ public function confirmDelete(string $id) {
'PetitionHistoryRecords'
];

$this->set('vv_person', $this->People->get((int)$id, contain: $contain));
$person = $this->People->get((int)$id, contain: $contain);
$this->set('vv_person', $person);

$this->Breadcrumb->injectTitleLink(
table: $this->People,
entity: $person,
action: 'edit',
label: $this->People->generateDisplayField($person)
);

$this->set('vv_title', __d('operation', 'delete.confirm.title'));
$this->set('vv_title', __d('operation', 'delete.a',[$person->primary_name->full_name]));

// We pull cluster information separately because it can't be contain'd
$this->set('vv_person_cluster_status', $this->People->Cos->Clusters->status((int)$id));
Expand Down
Loading