2022-10-16 17:19:26 +02:00

60 lines
2.3 KiB
HTML

<!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/bookings}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i
class="fas fa-sync"></i></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">
<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}">
<tr>
<td><a class="btn btn-icon-silent" 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.camp}"></td>
<td th:text="${b.role}"></td>
<td><span th:text="${#numbers.formatDecimal(b.paid, 1, 2) + ' €'}" th:if="${b.paid != null}"></span>
<form action="#" th:action="@{'/business/bookings/payment/' + ${b.pk}}" th:object="${addBean}" method="post">
<input type="number" step="0.01" th:field="*{payment}"> <input type="submit" style="padding: 4px" value="einzahlen">
</form></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>
</div>
</div>
</div>
</content>
</body>
</html>