integrated the business module
This commit is contained in:
80
src/main/resources/templates/business/privileges.html
Normal file
80
src/main/resources/templates/business/privileges.html
Normal file
@ -0,0 +1,80 @@
|
||||
<!DOCTYPE html>
|
||||
<html th:replace="~{template :: layout(~{::title}, ~{::libs}, ~{::header}, ~{::content})}" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
|
||||
<head>
|
||||
<title>Camp Organizer Business</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<libs>
|
||||
</libs>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<a th:href="@{/}" class="btn btn-secondary btn-icon-silent" title="zur Hauptseite"><i class="fas fa-home"></i></a>
|
||||
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent" title="zur Finanzübersicht"><i class="far fa-money-bill-alt"></i></a>
|
||||
<a th:href="@{/business/privileges}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i class="fas fa-sync"></i></a>
|
||||
</header>
|
||||
<content>
|
||||
<div class="mainpage">
|
||||
<div class="card">
|
||||
<div class="card-header">Nutzerverwaltung für die Abrechnung von Freizeiten</div>
|
||||
<div class="card-body">
|
||||
<table id="privs">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Freizeit</th>
|
||||
<th scope="col">Abrechnung darf bearbeiten</th>
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<th:block th:each="e : ${privileges.entrySet()}" sec:authorize="hasRole('admin')">
|
||||
<tr>
|
||||
<td><span th:text="${e.value.name}"></span> <span th:text="${#numbers.formatDecimal(e.value.year, 1, 0)}"></span></td>
|
||||
<td><th:block th:each="p : ${e.value.profiles}">
|
||||
<div class="dropdown" style="display: inline" th:if="${p.pk != null}">
|
||||
<button class="btn dropdown-toggle" style="border: 1px solid silver" type="button" th:id="'btn_' + ${e.key} + '_' + ${p.pk}" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span th:text="${p.forename} + ' ' + ${p.surname}"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu" style="background-image: linear-gradient(to bottom right, #defac0, #9ef542) !important;" th:aria-labelledby="'btn_' + ${e.key} + '_' + ${p.pk}">
|
||||
<li><div style="padding: 8px">
|
||||
Login: <span th:text="${p.username}"></span>
|
||||
</div></li>
|
||||
<li><div style="padding: 8px">
|
||||
Ablaufdatum: <span th:text="${#temporals.format(p.duedate, 'dd.MM.yyyy')}"></span>
|
||||
</div></li>
|
||||
<li><hr class="dropdown-divider" th:if="${p.username != currentUser}"></li>
|
||||
<li><a class="dropdown-item" th:if="${p.username != currentUser}" th:href="@{/business/privileges/delete?fkCamp={c}&fkProfile={r}(c=${e.key},r=${p.pk})}">Recht entziehen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</th:block></td>
|
||||
<td>
|
||||
<form action="#" th:action="@{/business/privileges/add?fkCamp={cid}(cid=${e.key})}" th:object="${bean}" method="post">
|
||||
<span class="btn-group"> <select th:id="${e.value.pk}" class="form-control select2-single" th:field="*{fkProfile}">
|
||||
<option value="">Auswählen</option>
|
||||
<th:block th:each="u : ${profiles}">
|
||||
<option th:if="${u != null}" th:value="${u.pk}" th:text="${u.dropdown()}" />
|
||||
</th:block>
|
||||
</select> <input type="submit" style="padding: 4px" value="Recht erteilen">
|
||||
</span>
|
||||
<script>
|
||||
var id = "[[${e.value.pk}]]";
|
||||
$("#" + id).select2();
|
||||
</script>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</th:block>
|
||||
</tbody>
|
||||
</table>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#privs").DataTable({
|
||||
language: locale_de
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</content>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user