Skip to content

Commit

Permalink
Fix Group Membership breadcrumb and subnav title for Person Canvas
Browse files Browse the repository at this point in the history
  • Loading branch information
Ioannis committed Apr 15, 2026
1 parent e036aa8 commit de934df
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
3 changes: 3 additions & 0 deletions app/resources/locales/en_US/menu.po
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ msgstr "All Features"
msgid "co.groups"
msgstr "Groups"

msgid "co.groups.memberships"
msgstr "Group Memberships"

msgid "co.operations"
msgstr "Operations"

Expand Down
3 changes: 0 additions & 3 deletions app/resources/locales/en_US/operation.po
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,3 @@ msgstr "View Petition {0}"

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

msgid "person.memberships"
msgstr "My Memberships"
4 changes: 2 additions & 2 deletions app/src/Controller/GroupMembersController.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ public function beforeRender(EventInterface $event) {

// If we're in a Person context (index filtered by ?person_id=...), override the page title.
if (
in_array($this->getRequest()->getParam('action'), ['index'], true)
$this->getRequest()->getParam('action') === 'index'
&& $this->getRequest()->getQuery('person_id') !== null
) {
$this->set('vv_title', __d('operation', 'person.memberships'));
$this->set('vv_title', __d('menu', 'co.groups.memberships'));

// Ensure the breadcrumb leaf is plain text (no extra title-links).
$this->set('vv_bc_title_links', []);
Expand Down
10 changes: 8 additions & 2 deletions app/templates/GroupMembers/columns.inc
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,14 @@ if ($this->request->getQuery('group_id') !== null) {
];

$subnav = 'people';
$localTitle = __d('controller','Groups', 99);

// If we're in a Person context (index filtered by ?person_id=...), do not override the subnav title.
if (
$this->getRequest()->getParam('action') === 'index'
&& empty($this->getRequest()->getQuery('person_id'))
) {
$localTitle = __d('controller','Groups', 99);
}

// Do not show the normal add link here
$suppressAddLink = true;
?>
Expand Down

0 comments on commit de934df

Please sign in to comment.