Skip to content

Commit

Permalink
change admin page department group link (#7442)
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael18811380328 authored Feb 8, 2025
1 parent c81d79b commit 25bf640
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion frontend/src/pages/org-admin/org-group-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class Content extends Component {
}

return (
<dl>
<dl className='mt-0'>
<dt>{gettext('Name')}</dt>
<dd>{group_name}</dd>

Expand Down
9 changes: 1 addition & 8 deletions frontend/src/pages/org-admin/org-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,7 @@ class GroupItem extends React.Component {
};

renderGroupHref = (group) => {
let groupInfoHref;
if (group.creatorName == 'system admin') {
groupInfoHref = siteRoot + 'org/departmentadmin/groups/' + group.id + '/';
} else {
groupInfoHref = siteRoot + 'org/groupadmin/' + group.id + '/';
}

return groupInfoHref;
return siteRoot + 'org/groupadmin/' + group.id + '/';
};

renderGroupCreator = (group) => {
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/pages/sys-admin/groups/groups-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,7 @@ class Item extends Component {
let groupName = '<span class="op-target">' + Utils.HTMLescape(item.name) + '</span>';
let deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', groupName);

const groupUrl = item.parent_group_id == 0 ?
`${siteRoot}sys/groups/${item.id}/libraries/` :
`${siteRoot}sys/departments/${item.id}/`;
const groupUrl = `${siteRoot}sys/groups/${item.id}/libraries/`;

let operations = [];
if (isPro) {
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/pages/sys-admin/orgs/org-groups.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,7 @@ class Item extends Component {
const itemName = '<span class="op-target">' + Utils.HTMLescape(item.group_name) + '</span>';
const deleteDialogMsg = gettext('Are you sure you want to delete {placeholder} ?').replace('{placeholder}', itemName);

const groupUrl = item.parent_group_id == 0 ?
`${siteRoot}sys/groups/${item.group_id}/libraries/` :
`${siteRoot}sys/departments/${item.group_id}/`;
const groupUrl = `${siteRoot}sys/groups/${item.group_id}/libraries/`;

return (
<Fragment>
Expand Down

0 comments on commit 25bf640

Please sign in to comment.