Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Queue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
EIP
Labrador
Queue
Commits
bb239437
Commit
bb239437
authored
Feb 24, 2023
by
Henry Page
Browse files
Options
Downloads
Patches
Plain Diff
Move buttons to right
parent
2228741c
No related branches found
No related tags found
2 merge requests
!630
New release
,
!621
Resolve "Can not delete a shared lab from the shared edition overview"
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/java/nl/tudelft/queue/service/PermissionService.java
+1
-1
1 addition, 1 deletion
...main/java/nl/tudelft/queue/service/PermissionService.java
src/main/resources/templates/shared-edition/view/session-list.html
+6
-3
6 additions, 3 deletions
...resources/templates/shared-edition/view/session-list.html
with
7 additions
and
4 deletions
src/main/java/nl/tudelft/queue/service/PermissionService.java
+
1
−
1
View file @
bb239437
...
...
@@ -406,7 +406,7 @@ public class PermissionService {
* @param editionList The editions to check for
* @return true iff the person is allowed to modify said editions, false otherwise
*/
public
boolean
hasPermission
InAnyEdition
(
List
<
EditionSummaryDTO
>
editionList
)
{
public
boolean
canManage
InAnyEdition
(
List
<
EditionSummaryDTO
>
editionList
)
{
return
editionList
.
stream
().
anyMatch
(
edition
->
canManageSessions
(
edition
.
getId
()));
}
...
...
...
...
This diff is collapsed.
Click to expand it.
src/main/resources/templates/shared-edition/view/session-list.html
+
6
−
3
View file @
bb239437
...
...
@@ -53,7 +53,12 @@
<td>
<a
th:text=
"${lab.name}"
th:href=
"@{/lab/{id}(id=${lab.id})}"
></a>
<span
th:if=
"${lab.isShared}"
class=
"badge badge-pill badge-info text-white"
>
Shared lab
</span>
<div
class=
"btn-group float-right"
th:if=
"${@permissionService.hasPermissionInAnyEdition(lab.associatedEditions)}"
>
</td>
<td
th:text=
"${#temporals.format(lab.slot.opensAt, 'dd MMMM yyyy HH:mm')}"
></td>
<td>
<span
th:text=
"${#temporals.format(lab.slot.closesAt, 'dd MMMM yyyy HH:mm')}"
></span>
<div
class=
"btn-group float-right"
th:if=
"${@permissionService.canManageInAnyEdition(lab.associatedEditions)}"
>
<th:block>
<a
th:href=
"@{/lab/{id}/edit(id=${lab.id})}"
class=
"btn btn-sm btn-secondary"
>
...
...
@@ -75,8 +80,6 @@
</th:block>
</div>
</td>
<td
th:text=
"${#temporals.format(lab.slot.opensAt, 'dd MMMM yyyy HH:mm')}"
></td>
<td
th:text=
"${#temporals.format(lab.slot.closesAt, 'dd MMMM yyyy HH:mm')}"
></td>
</tr>
</th:block>
</div>
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment