see #45
This commit is contained in:
@ -14,17 +14,17 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="c : ${camps}">
|
||||
<td><a th:href="@{/admin/camp/edit/{id}(id=${c.pk})}"><span th:text="${c.name}"></span></a></td>
|
||||
<td><a th:href="@{/admin/camp/edit/{id}(id=${c.pk})}"><i class="fas fa-pen beforetext"></i><span th:text="${c.name}"></span></a></td>
|
||||
<td><th:block th:each="l : ${locations}">
|
||||
<span th:if="${l.pk == c.fkLocation}" th:text="${l.name}"></span>
|
||||
</th:block></td>
|
||||
<td><span th:text="${#temporals.format(c.arrive, 'dd.MM.')}"></span> - <span th:text="${#temporals.format(c.depart, 'dd.MM.yyyy')}"></span></td>
|
||||
<td><a th:href="@{/document/{id}(id=${c.fkDocument})}"><i class="fas fa-download"></i></a></td>
|
||||
<td><a th:href="@{/document/{id}(id=${c.fkDocument})}"><i class="fas fa-download beforetext"></i>anzeigen</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center"><a th:href="@{/admin/camp/add}" class="btn btn-outline-primary">neue Freizeit anlegen</a></td>
|
||||
<td colspan="4" style="text-align: center"><a th:href="@{/admin/camp/add}" class="btn btn-outline-primary">neue Freizeit anlegen</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
@ -10,12 +10,11 @@
|
||||
<td>Dokumententyp</td>
|
||||
<td>Zielgruppe</td>
|
||||
<th>Inhalt</th>
|
||||
<th>Dateityp</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="d : ${documents}">
|
||||
<td><a th:href="@{/admin/document/edit/{id}(id=${d.pk})}"><span th:text="${d.name}"></span></a></td>
|
||||
<td><a th:href="@{/admin/document/edit/{id}(id=${d.pk})}"><i class="fas fa-pen beforetext"></i><span th:text="${d.name}"></span></a></td>
|
||||
<td><span th:if="${d.doctype.literal == 'location'}">Wegbeschreibung</span> <span th:if="${d.doctype.literal == 'camp'}">Bestätigung</span><span
|
||||
th:if="${d.doctype.literal == 'camppass'}">Freizeitpass</span></td>
|
||||
<td><th:block th:each="r : ${d.roles}">
|
||||
@ -25,13 +24,12 @@
|
||||
<span th:if="${r.literal == 'feeder'}" class="roleflag">Küche</span>
|
||||
<span th:if="${r.literal == 'observer'}" class="roleflag">Mitarbeiterkind</span>
|
||||
</th:block></td>
|
||||
<td><a th:href="@{/document/{id}(id=${d.pk})}"><i class="fas fa-download"></i></a></td>
|
||||
<td><span th:text="${d.filetype.literal}" th:if="${d.filetype}"></span></td>
|
||||
<td><a th:href="@{/document/{id}(id=${d.pk})}"><i class="fas fa-download beforetext"></i><span th:text="${d.filetype.literal}" th:if="${d.filetype}"></span> anzeigen</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center"><a th:href="@{/admin/document/add}" class="btn btn-outline-primary">neues Dokument anlegen</a></td>
|
||||
<td colspan="4" style="text-align: center"><a th:href="@{/admin/document/add}" class="btn btn-outline-primary">neues Dokument anlegen</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
@ -13,14 +13,14 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="l : ${locations}">
|
||||
<td><a th:href="@{/admin/location/edit/{id}(id=${l.pk})}"><span th:text="${l.name}"></span></a></td>
|
||||
<td th:text="${l.url}"></td>
|
||||
<td><a th:href="@{/document/{id}(id=${l.fkDocument})}"><i class="fas fa-download"></i></a></td>
|
||||
<td><a th:href="@{/admin/location/edit/{id}(id=${l.pk})}"><i class="fas fa-pen beforetext"></i><span th:text="${l.name}"></span></a></td>
|
||||
<td><a th:href="${l.url}" target="_blank"><i class="fas fa-external-link-alt beforetext"></i><span th:text="${l.url}"></span></a></td>
|
||||
<td><a th:href="@{/document/{id}(id=${l.fkDocument})}"><i class="fas fa-download beforetext"></i>anzeigen</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6" style="text-align: center"><a th:href="@{/admin/location/add}" class="btn btn-outline-primary">neues Freizeitheim anlegen</a></td>
|
||||
<td colspan="3" style="text-align: center"><a th:href="@{/admin/location/add}" class="btn btn-outline-primary">neues Freizeitheim anlegen</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
66
src/main/resources/templates/admin/privileges/add.html
Normal file
66
src/main/resources/templates/admin/privileges/add.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<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">
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div sec:authorize="hasRole('admin')">
|
||||
<form th:action="@{/admin/privileges/insert/{d}(d=${pagedest})}" th:object="${bean}" method="post" enctype="multipart/form-data">
|
||||
<div class="tablebox">
|
||||
<div class="container">
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-12">
|
||||
<div class="alert alter-danger" th:if="${error}" th:text="${error}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputPerson" class="col-sm-2 col-form-label">Person</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('fkProfile')}">[[${error}]]<br /></span> <select id="inputPerson" th:field="*{fkProfile}"
|
||||
th:class="${'form-select ' + (#fields.hasErrors('fkProfile') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="l : ${profiles}" th:value="${l.pk}" th:text="${l.fullname}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#inputPerson").select2();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputCamp" class="col-sm-2 col-form-label">Freizeit</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('fkCamp')}">[[${error}]]<br /></span> <select id="inputCamp" th:field="*{fkCamp}"
|
||||
th:class="${'form-select ' + (#fields.hasErrors('fkCamp') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="l : ${camps}" th:value="${l.pk}" th:text="${l.name}"></option>
|
||||
</select>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$("#inputCamp").select2();
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<label for="inputModule" class="col-sm-2 col-form-label">Modul</label>
|
||||
<div class="col-sm-10">
|
||||
<span class="error" th:each="error : ${#fields.errors('module')}">[[${error}]]<br /></span> <select id="inputModule" th:field="*{module}"
|
||||
th:class="${'form-select ' + (#fields.hasErrors('module') ? 'inputerror' : '')}">
|
||||
<option value="">--- bitte wählen ---</option>
|
||||
<option th:each="l : ${modules}" th:value="${l}" th:text="${l}"></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-2">
|
||||
<div class="col-sm-2"></div>
|
||||
<div class="col-sm-10">
|
||||
<input type="submit" class="btn btn-success" value="Ok" /> <a th:href="@{/admin/privileges/abortinsert/{d}(d=${pagedest})}" class="btn btn-outline-secondary">Abbrechen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
70
src/main/resources/templates/admin/privileges/campbased.html
Normal file
70
src/main/resources/templates/admin/privileges/campbased.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<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 Privileges</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div sec:authorize="hasRole('admin')">
|
||||
<div class="tablebox">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span th:text="${selected}" th:if="${selected}"></span> <span th:unless="${selected}">-- bitte wählen --</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li th:each="e : ${list}"><a class="dropdown-item" th:href="@{/admin/privileges/campbased/{r}(r=${e.pk})}"><span th:text="${e.fullname}"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card" th:if="${selected}">
|
||||
<div class="card-header">
|
||||
<h1 th:text="${selected}"></h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Person</th>
|
||||
<th>Modul</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="m : ${container.map}">
|
||||
<td th:text="${m.key}"></td>
|
||||
<td>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group beforetext" role="group" th:each="v : ${m.value}" th:if="${m.value}">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" th:href="@{/admin/privileges/delete/{id}/{d}(id=${v.key}, d=${pagedest})}">endgültig löschen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary" th:text="${v.value}" disabled></button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center"><a th:href="@{/admin/privileges/add/{d}(d=${pagedest})}" class="btn btn-outline-primary">neue Berechtigung vergeben</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
language : locale_de
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
66
src/main/resources/templates/admin/privileges/rolebased.html
Normal file
66
src/main/resources/templates/admin/privileges/rolebased.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<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 Privileges</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div sec:authorize="hasRole('admin')">
|
||||
<div class="tablebox">
|
||||
<div class="btn-group" role="group">
|
||||
<a th:class="${e == selected ? 'btn btn-primary' : 'btn btn-outline-secondary'}" th:each="e : ${list}" th:href="@{/admin/privileges/rolebased/{r}(r=${e})}"> <span th:text="${e}"></span>
|
||||
</a>
|
||||
</div>
|
||||
<div class="card" th:if="${selected}">
|
||||
<div class="card-header">
|
||||
<h1 th:text="${selected}"></h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Freizeit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="m : ${container.map}">
|
||||
<td th:text="${m.key}"></td>
|
||||
<td>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group beforetext" role="group" th:each="v : ${m.value}" th:if="${m.value}">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" th:href="@{/admin/privileges/delete/{id}/{d}(id=${v.key}, d=${pagedest})}">endgültig löschen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary" th:text="${v.value}" disabled></button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center"><a th:href="@{/admin/privileges/add/{d}(d=${pagedest})}" class="btn btn-outline-primary">neue Berechtigung vergeben</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
language : locale_de
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
70
src/main/resources/templates/admin/privileges/userbased.html
Normal file
70
src/main/resources/templates/admin/privileges/userbased.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<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 Privileges</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
</head>
|
||||
<body>
|
||||
<th:block layout:fragment="content">
|
||||
<div sec:authorize="hasRole('admin')">
|
||||
<div class="tablebox">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<span th:text="${selected}" th:if="${selected}"></span> <span th:unless="${selected}">-- bitte wählen --</span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li th:each="e : ${list}"><a class="dropdown-item" th:href="@{/admin/privileges/userbased/{r}(r=${e.pk})}"><span th:text="${e.fullname}"></span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card" th:if="${selected}">
|
||||
<div class="card-header">
|
||||
<h1 th:text="${selected}"></h1>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table id="table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Modul</th>
|
||||
<th>Freizeit</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="m : ${container.map}">
|
||||
<td th:text="${m.key}"></td>
|
||||
<td>
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group beforetext" role="group" th:each="v : ${m.value}" th:if="${m.value}">
|
||||
<div class="dropdown">
|
||||
<button class="btn btn-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
<i class="fas fa-trash-alt"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item" th:href="@{/admin/privileges/delete/{id}/{d}(id=${v.key}, d=${pagedest})}">endgültig löschen</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button type="button" class="btn btn-outline-secondary" th:text="${v.value}" disabled></button>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="2" style="text-align: center"><a th:href="@{/admin/privileges/add/{d}(d=${pagedest})}" class="btn btn-outline-primary">neue Berechtigung vergeben</a></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
language : locale_de
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user