Skip to content

Commit

Permalink
Fixing visibility of link buttons in Archive group tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
krulis-martin committed Jun 4, 2024
1 parent 319d2ac commit 7b3d09f
Showing 1 changed file with 21 additions and 13 deletions.
34 changes: 21 additions & 13 deletions src/pages/Archive/Archive.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,34 @@ class Archive extends Component {
<FormattedMessage id="app.group.unsetRoot" defaultMessage="Unset" />
)}
</Button>
<Link to={GROUP_INFO_URI_FACTORY(group.id)}>
<Button variant="primary" size="xs">
<GroupIcon gapRight />
<FormattedMessage id="app.group.info" defaultMessage="Group Info" />
</Button>
</Link>
<Link to={GROUP_ASSIGNMENTS_URI_FACTORY(group.id)}>
<Button variant="primary" size="xs">
<AssignmentsIcon gapRight />
<FormattedMessage id="app.group.assignments" defaultMessage="Assignments" />
</Button>
</Link>
{!group.organizational && (

{hasPermissions(group, 'viewDetail') && (
<Link to={GROUP_INFO_URI_FACTORY(group.id)}>
<Button variant="primary" size="xs">
<GroupIcon gapRight />
<FormattedMessage id="app.group.info" defaultMessage="Group Info" />
</Button>
</Link>
)}

{hasPermissions(group, 'viewAssignments') && (
<Link to={GROUP_ASSIGNMENTS_URI_FACTORY(group.id)}>
<Button variant="primary" size="xs">
<AssignmentsIcon gapRight />
<FormattedMessage id="app.group.assignments" defaultMessage="Assignments" />
</Button>
</Link>
)}

{!group.organizational && hasPermissions(group, 'viewAssignments') && (
<Link to={GROUP_STUDENTS_URI_FACTORY(group.id)}>
<Button variant="primary" size="xs">
<StudentsIcon gapRight />
<FormattedMessage id="app.group.students" defaultMessage="Students" />
</Button>
</Link>
)}

{hasPermissions(group, 'archive') && (!group.archived || group.directlyArchived) && (
<ArchiveGroupButtonContainer id={group.id} size="xs" shortLabels onChange={() => loadAsync(instanceId)} />
)}
Expand Down

0 comments on commit 7b3d09f

Please sign in to comment.