layout cleanup
This commit is contained in:
@ -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> <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> <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>
|
Reference in New Issue
Block a user