layout cleanup

This commit is contained in:
Jottyfan
2022-11-14 15:16:10 +01:00
parent 55ff76c29b
commit abeba4935c
18 changed files with 795 additions and 722 deletions

View File

@ -1,89 +1,94 @@
<!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">
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 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">Hauptseite</a>
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a>
<a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('business_booking')">Buchungsübersicht</a>
</header>
<content>
<div class="mainpage">
<div class="container" style="max-width: 100%">
<div class="row">
<div class="col">
<div class="card" style="width: 480px" sec:authorize="hasRole('business_booking')">
<div class="card-header">Angemeldete Person</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr>
<th>Name</th>
<td th:text="${booker.name}"></td>
</tr>
<tr>
<th>Geschlecht</th>
<td th:text="${booker.sex}"></td>
</tr>
<tr>
<th>Freizeit</th>
<td><a class="tablelink" th:href="@{/business/camp/{id}(id=${booker.campId})}" th:text="${booker.camp}"></a></td>
</tr>
<tr>
<th>Rolle</th>
<td th:text="${booker.role}"></td>
</tr>
<tr>
<th>Angemeldet</th>
<td th:text="${#temporals.format(booker.bookingDate, 'dd.MM.yyyy')}"></td>
</tr>
<tr>
<th>Bestätigt</th>
<td th:text="${booker.accept == null ? '' : (booker.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
<tr>
<th>Preis</th>
<td th:text="${booker.price}" />
</tr>
<tr>
<th>Kontostand</th>
<td><span th:text="${#numbers.formatDecimal(booker.paid, 1, 2) + ' €'}" th:if="${booker.paid != null}"></span>
</tr>
</tbody>
</table>
<th:block layout:fragment="header">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/}" class="btn btn-secondary btn-icon-silent">Hauptseite</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('business_booking')">Buchungsübersicht</a></li>
</ul>
</th:block>
<th:block layout:fragment="content">
<div class="mainpage">
<div class="container" style="max-width: 100%">
<div class="row">
<div class="col">
<div class="card" style="width: 480px" sec:authorize="hasRole('business_booking')">
<div class="card-header">Angemeldete Person</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr>
<th>Name</th>
<td th:text="${booker.name}"></td>
</tr>
<tr>
<th>Geschlecht</th>
<td th:text="${booker.sex}"></td>
</tr>
<tr>
<th>Freizeit</th>
<td><a class="tablelink" th:href="@{/business/camp/{id}(id=${booker.campId})}" th:text="${booker.camp}"></a></td>
</tr>
<tr>
<th>Rolle</th>
<td th:text="${booker.role}"></td>
</tr>
<tr>
<th>Angemeldet</th>
<td th:text="${#temporals.format(booker.bookingDate, 'dd.MM.yyyy')}"></td>
</tr>
<tr>
<th>Bestätigt</th>
<td th:text="${booker.accept == null ? '' : (booker.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
<tr>
<th>Preis</th>
<td th:text="${booker.price}" />
</tr>
<tr>
<th>Kontostand</th>
<td><span th:text="${#numbers.formatDecimal(booker.paid, 1, 2) + ' €'}" th:if="${booker.paid != null}"></span>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card" style="width: 480px" sec:authorize="hasRole('business_booking')">
<div class="card-header">Einzahlung</div>
<div class="card-body">
<div class="alert alert-primary alert-dismissible fade show" role="alert">
Ein negativer Betrag kommt einer Auszahlung gleich.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
</div>
<form action="#" th:action="@{'/business/bookings/payment/' + ${booker.pk}}" th:object="${addBean}" method="post">
<div class="container">
<div class="row">
<div class="col-sm-8">
<input type="number" class="form-control" step="0.01" th:field="*{payment}" />
</div>
<div class="col-sm-4">
<input type="submit" class="btn btn-outline-primary" value="einzahlen">
<div class="col">
<div class="card" style="width: 480px" sec:authorize="hasRole('business_booking')">
<div class="card-header">Einzahlung</div>
<div class="card-body">
<div class="alert alert-primary alert-dismissible fade show" role="alert">
Ein negativer Betrag kommt einer Auszahlung gleich.
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Schließen"></button>
</div>
<form action="#" th:action="@{'/business/bookings/payment/' + ${booker.pk}}" th:object="${addBean}" method="post">
<div class="container">
<div class="row">
<div class="col-sm-8">
<input type="number" class="form-control" step="0.01" th:field="*{payment}" />
</div>
<div class="col-sm-4">
<input type="submit" class="btn btn-outline-primary" value="einzahlen">
</div>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</content>
</th:block>
</body>
</html>

View File

@ -1,84 +1,87 @@
<!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">
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 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">Hauptseite</a>
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a>
</header>
<content>
<div class="mainpage">
<div class="card" sec:authorize="hasRole('business_booking')">
<div class="card-header">Angemeldete Personen</div>
<div class="card-body">
<table id="bookers" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Geschlecht</th>
<th>Freizeit</th>
<th>Rolle</th>
<th>Kontostand</th>
<th>Angemeldet</th>
<th>Bestätigt</th>
</tr>
</thead>
<tbody>
<th:block th:each="b : ${bookers}">
<th:block layout:fragment="header">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/}" class="btn btn-secondary btn-icon-silent">Hauptseite</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a></li>
</ul>
</th:block>
<th:block layout:fragment="content">
<div class="mainpage">
<div class="card" sec:authorize="hasRole('business_booking')">
<div class="card-header">Angemeldete Personen</div>
<div class="card-body">
<table id="bookers" class="table table-striped">
<thead>
<tr>
<td class="middled"><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td class="middled" th:text="${b.sex}"></td>
<td class="middled" th:text="${b.camp}"></td>
<td class="middled" th:text="${b.role}"></td>
<td class="middled">
<form action="#" th:action="@{'/business/bookings/listpayment/' + ${b.pk}}" th:object="${addBean}" method="post">
<input th:id="'searchfield' + ${b.pk}" type="hidden" th:name="search" />
<div class="container">
<div class="row">
<div class="col-sm-4" style="text-align: right">
<span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" style="font-size: x-large" th:if="${b.paid != null}"></span>
</div>
<div class="col-sm-4">
<input type="number" step="0.01" class="form-control" th:field="*{payment}" />
</div>
<div class="col-sm-4">
<input type="submit" class="btn btn-outline-primary" th:onclick="'setSearchField(' + ${b.pk} + ')'" style="padding: 4px" value="einzahlen" />
<th>Name</th>
<th>Geschlecht</th>
<th>Freizeit</th>
<th>Rolle</th>
<th>Kontostand</th>
<th>Angemeldet</th>
<th>Bestätigt</th>
</tr>
</thead>
<tbody>
<th:block th:each="b : ${bookers}">
<tr>
<td class="middled"><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td class="middled" th:text="${b.sex}"></td>
<td class="middled" th:text="${b.camp}"></td>
<td class="middled" th:text="${b.role}"></td>
<td class="middled">
<form action="#" th:action="@{'/business/bookings/listpayment/' + ${b.pk}}" th:object="${addBean}" method="post">
<input th:id="'searchfield' + ${b.pk}" type="hidden" th:name="search" />
<div class="container">
<div class="row">
<div class="col-sm-4" style="text-align: right">
<span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" style="font-size: x-large" th:if="${b.paid != null}"></span>
</div>
<div class="col-sm-4">
<input type="number" step="0.01" class="form-control" th:field="*{payment}" />
</div>
<div class="col-sm-4">
<input type="submit" class="btn btn-outline-primary" th:onclick="'setSearchField(' + ${b.pk} + ')'" style="padding: 4px" value="einzahlen" />
</div>
</div>
</div>
</div>
</form>
</td>
<td class="middled" th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
<td class="middled" th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
</th:block>
</tbody>
</table>
<script th:inline="javascript">
/*<![CDATA[*/
var searchValue = /*[[${search}]]*/ '';
</form>
</td>
<td class="middled" th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
<td class="middled" th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
</th:block>
</tbody>
</table>
<script th:inline="javascript">
/*<![CDATA[*/
var searchValue = /*[[${search}]]*/'';
$(document).ready(function() {
$("#bookers").DataTable({
language : locale_de,
search : {
search : searchValue
}
$(document).ready(function() {
$("#bookers").DataTable({
language : locale_de,
search : {
search : searchValue
}
});
});
});
function setSearchField(x) {
$("#searchfield" + x).val($("#bookers").DataTable().search());
}
/*]]>*/
</script>
function setSearchField(x) {
$("#searchfield" + x).val($("#bookers").DataTable().search());
}
/*]]>*/
</script>
</div>
</div>
</div>
</div>
</content>
</th:block>
</body>
</html>

View File

@ -1,49 +1,54 @@
<!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">
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 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">Hauptseite</a>
<a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('business_booking')">Buchungsübersicht</a>
<a th:href="@{/business/privileges}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('admin')">Nutzerverwaltung</a>
</header>
<content>
<div class="mainpage">
<div class="card" style="width: 640px">
<div class="card-header">Finanzübersicht über alle Freizeiten</div>
<div class="card-body">
<table id="camps" class="table table-striped">
<thead>
<tr>
<th scope="col">Jahr</th>
<th scope="col">Freizeit</th>
<th scope="col">Kontostand</th>
</tr>
</thead>
<tbody>
<th:block th:each="b : ${campBudgets}" sec:authorize="hasRole('business')">
<th:block layout:fragment="header">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/}" class="btn btn-secondary btn-icon-silent">Hauptseite</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/bookings}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('business_booking')">Buchungsübersicht</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/privileges}" class="btn btn-secondary btn-icon-silent" sec:authorize="hasRole('admin')">Nutzerverwaltung</a></li>
</ul>
</th:block>
<th:block layout:fragment="content">
<div class="mainpage">
<div class="card" style="width: 640px">
<div class="card-header">Finanzübersicht über alle Freizeiten</div>
<div class="card-body">
<table id="camps" class="table table-striped">
<thead>
<tr>
<td th:text="${#numbers.formatDecimal(b.campYear, 1, 0)}"></td>
<td><a th:href="@{/business/camp/{id}(id=${b.campId})}" th:text="${b.campName}" class="tablelink" title="Freizeitübersicht laden"></a></td>
<td th:text="${#numbers.formatDecimal(b.budget, 1, 2) + ' €'}"></td>
<th scope="col">Jahr</th>
<th scope="col">Freizeit</th>
<th scope="col">Kontostand</th>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#camps").DataTable({
language: locale_de
</thead>
<tbody>
<th:block th:each="b : ${campBudgets}" sec:authorize="hasRole('business')">
<tr>
<td th:text="${#numbers.formatDecimal(b.campYear, 1, 0)}"></td>
<td><a th:href="@{/business/camp/{id}(id=${b.campId})}" th:text="${b.campName}" class="tablelink" title="Freizeitübersicht laden"></a></td>
<td th:text="${#numbers.formatDecimal(b.budget, 1, 2) + ' €'}"></td>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#camps").DataTable({
language : locale_de
});
});
});
</script>
</script>
</div>
</div>
</div>
</div>
</content>
</th:block>
</body>
</html>

View File

@ -1,104 +1,107 @@
<!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">
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 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">Hauptseite</a>
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a>
</header>
<content>
<div class="mainpage">
<div class="container" style="max-width: 100%">
<div class="row">
<div class="col">
<div class="card" style="width: 480px" th:if="${camp != null}">
<div class="card-header">
<span th:text="${camp.name}"></span> von <span th:text="${#numbers.formatInteger(camp.year, 0)}"></span>
</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr>
<td>Freizeitname</td>
<th th:text="${camp.name}"></th>
</tr>
<tr>
<td>Zeit</td>
<th><span th:text="${#temporals.format(camp.arrive, 'dd.MM.')}"></span> - <span th:text="${#temporals.format(camp.depart, 'dd.MM.yyyy')}"></span></th>
<tr>
<td>Ort</td>
<th th:text="${camp.locationName}"></th>
</tr>
<tr>
<td>Preis</td>
<th><pre th:utext="${camp.price}"></pre></th>
</tr>
<tr>
<td>bestätigt</td>
<th th:text="${booking.approved}"></th>
</tr>
<tr>
<td>abgelehnt</td>
<th th:text="${booking.rejected}"></th>
</tr>
<tr>
<td>offen</td>
<th th:text="${booking.open}"></th>
</tr>
<tr>
<td>Beiträge</td>
<th><span th:text="${#numbers.formatDecimal(booking.paid, 1, 2) + ' €'}" th:if="${booking.paid != null}"></span></th>
</tbody>
</table>
<th:block layout:fragment="header">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/}" class="btn btn-secondary btn-icon-silent">Hauptseite</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a></li>
</ul>
</th:block>
<th:block layout:fragment="content">
<div class="mainpage">
<div class="container" style="max-width: 100%">
<div class="row">
<div class="col">
<div class="card" style="width: 480px" th:if="${camp != null}">
<div class="card-header">
<span th:text="${camp.name}"></span> von <span th:text="${#numbers.formatInteger(camp.year, 0)}"></span>
</div>
<div class="card-body">
<table class="table table-striped">
<tbody>
<tr>
<td>Freizeitname</td>
<th th:text="${camp.name}"></th>
</tr>
<tr>
<td>Zeit</td>
<th><span th:text="${#temporals.format(camp.arrive, 'dd.MM.')}"></span> - <span th:text="${#temporals.format(camp.depart, 'dd.MM.yyyy')}"></span></th>
<tr>
<td>Ort</td>
<th th:text="${camp.locationName}"></th>
</tr>
<tr>
<td>Preis</td>
<th><pre th:utext="${camp.price}"></pre></th>
</tr>
<tr>
<td>bestätigt</td>
<th th:text="${booking.approved}"></th>
</tr>
<tr>
<td>abgelehnt</td>
<th th:text="${booking.rejected}"></th>
</tr>
<tr>
<td>offen</td>
<th th:text="${booking.open}"></th>
</tr>
<tr>
<td>Beiträge</td>
<th><span th:text="${#numbers.formatDecimal(booking.paid, 1, 2) + ' €'}" th:if="${booking.paid != null}"></span></th>
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col" sec:authorize="hasRole('business_booking')">
<div class="card">
<div class="card-header">Angemeldete Personen</div>
<div class="card-body">
<table id="bookers" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Geschlecht</th>
<th>Rolle</th>
<th>Kontostand</th>
<th>Angemeldet</th>
<th>Bestätigt</th>
</tr>
</thead>
<tbody>
<th:block th:each="b : ${bookers}">
<div class="col" sec:authorize="hasRole('business_booking')">
<div class="card">
<div class="card-header">Angemeldete Personen</div>
<div class="card-body">
<table id="bookers" class="table table-striped">
<thead>
<tr>
<td><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td th:text="${b.sex}"></td>
<td th:text="${b.role}"></td>
<td><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span></td>
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
<td th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
<th>Name</th>
<th>Geschlecht</th>
<th>Rolle</th>
<th>Kontostand</th>
<th>Angemeldet</th>
<th>Bestätigt</th>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#bookers").DataTable({
language: locale_de
</thead>
<tbody>
<th:block th:each="b : ${bookers}">
<tr>
<td><a class="tablelink" th:href="@{/business/bookings/{id}(id=${b.pk})}" title="bearbeiten" th:text="${b.name}"></a></td>
<td th:text="${b.sex}"></td>
<td th:text="${b.role}"></td>
<td><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span></td>
<td th:text="${#temporals.format(b.bookingDate, 'dd.MM.yyyy')}"></td>
<td th:text="${b.accept == null ? '' : (b.accept ? 'Ja' : 'abgelehnt')}"></td>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#bookers").DataTable({
language : locale_de
});
});
});
</script>
</script>
</div>
</div>
</div>
</div>
</div>
<div class="alert alert-danger" role="alert" th:if="${camp == null}">Es wurde keine Freizeit gefunden, die über diese ID angesprochen werden kann.</div>
</div>
<div class="alert alert-danger" role="alert" th:if="${camp == null}">Es wurde keine Freizeit gefunden, die über diese ID angesprochen werden kann.</div>
</div>
</content>
</th:block>
</body>
</html>

View File

@ -1,90 +1,92 @@
<!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">
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" 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">Hauptseite</a>
<a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</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" class="table table-striped">
<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')">
<th:block layout:fragment="header">
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/}" class="btn btn-secondary btn-icon-silent">Hauptseite</a></li>
</ul>
<ul class="navbar-nav mb-2 mb-lg-0">
<li class="nav-item"><a th:href="@{/business/}" class="btn btn-secondary btn-icon-silent">Finanzübersicht</a></li>
</ul>
</th:block>
<th:block layout:fragment="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" class="table table-striped">
<thead>
<tr>
<td class="middled"><span th:text="${e.value.name}"></span>&nbsp;<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 silver-to-gray-gradient" 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 menu-danger" 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">
<div class="container">
<div class="row">
<div class="col-sm-9">
<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.fullname}" th:title="${u.dropdown()}" />
</th:block>
</select>
</div>
<div class="col-sm-3">
<input type="submit" class="btn btn-outline-primary" value="Recht erteilen">
<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 class="middled"><span th:text="${e.value.name}"></span>&nbsp;<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 silver-to-gray-gradient" 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 menu-danger" 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">
<div class="container">
<div class="row">
<div class="col-sm-9">
<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.fullname}" th:title="${u.dropdown()}" />
</th:block>
</select>
</div>
<div class="col-sm-3">
<input type="submit" class="btn btn-outline-primary" value="Recht erteilen">
</div>
</div>
</div>
</div>
<script>
var id = "[[${e.value.pk}]]";
$("#" + id).select2({
theme: 'bootstrap-5',
});
</script>
</form>
</td>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#privs").DataTable({
language : locale_de
<script>
var id = "[[${e.value.pk}]]";
$("#" + id).select2({
theme : 'bootstrap-5',
});
</script>
</form>
</td>
</tr>
</th:block>
</tbody>
</table>
<script>
$(document).ready(function() {
$("#privs").DataTable({
language : locale_de
});
});
});
</script>
</script>
</div>
</div>
</div>
</div>
</content>
</th:block>
</body>
</html>