Skip to content
Snippets Groups Projects
Commit bb239437 authored by Henry Page's avatar Henry Page :speech_balloon:
Browse files

Move buttons to right

parent 2228741c
No related branches found
No related tags found
2 merge requests!630New release,!621Resolve "Can not delete a shared lab from the shared edition overview"
......@@ -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 hasPermissionInAnyEdition(List<EditionSummaryDTO> editionList) {
public boolean canManageInAnyEdition(List<EditionSummaryDTO> editionList) {
return editionList.stream().anyMatch(edition -> canManageSessions(edition.getId()));
}
......
......
......@@ -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>
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment