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>