add, edit, delete and assign themes to dates
This commit is contained in:
@ -32,15 +32,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td><span th:text="${s.slotNotes}" class="rightpadding64"></span><a th:href="@{/slot/{id}(id=${s.pkSlot})}" class="btn btn-outline-secondary rightaligned"><i
|
||||
class="bi bi-pencil"></i></a></td>
|
||||
<td><a th:href="@{/slot/{id}(id=${s.pkSlot})}" class="btn btn-outline-secondary rightaligned"><i class="bi bi-pencil"></i></a>
|
||||
<span th:text="${s.slotNotes}" class="rightpadding64"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<a th:href="@{/slot}" class="btn btn-outline-success">ein neues Datum anlegen</a>
|
||||
<a th:href="@{/subject/new}" class="btn btn-outline-primary">ein neues Thema anlegen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
18
src/main/resources/templates/subject/delete.html
Normal file
18
src/main/resources/templates/subject/delete.html
Normal file
@ -0,0 +1,18 @@
|
||||
<!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 class="borderdist">
|
||||
<div class="alert alert-danger centeredalert" th:if="${bean}">
|
||||
Soll das Thema <span th:text="${bean.theme}" style="font-weight: bolder"></span> wirklich gelöscht werden?
|
||||
<br />
|
||||
<br />
|
||||
<a th:href="@{/subject/{id}/remove(id=${bean.pkSubject})}" class="btn btn-outline-danger">Ja, wirklich löschen</a>
|
||||
</div>
|
||||
<div class="alert alert-warning centeredalert" th:unless="${bean}">
|
||||
Dieses Thema kann nicht gelöscht werden. Möglicherweise wurde es bereits in der Vergangenheit gehalten.
|
||||
</div>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
40
src/main/resources/templates/subject/item.html
Normal file
40
src/main/resources/templates/subject/item.html
Normal file
@ -0,0 +1,40 @@
|
||||
<!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 class="borderdist">
|
||||
<form th:action="@{/subject/save}" method="post" th:object="${bean}">
|
||||
<input type="hidden" th:field="*{pkSubject}" />
|
||||
<div class="container">
|
||||
<div class="row g-2">
|
||||
<div class="col-sm-3">Quelle</div>
|
||||
<div class="col-sm-9"><select th:field="*{fkSource}" class="form-select">
|
||||
<option th:each="o : ${sources}" th:value="${o.pkSource}" th:text="${o.name}"></option>
|
||||
</select></div>
|
||||
<div class="col-sm-3">Thema</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{theme}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Unterthema</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{subtheme}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Buchseiten</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{bookPages}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Arbeitsblätter</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{worksheets}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Bibelvers / Lernvers</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{bibleverse}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Anmerkungen</div>
|
||||
<div class="col-sm-9"><input type="text" th:field="*{notes}" class="form-control" /></div>
|
||||
<div class="col-sm-3">Reihenfolge</div>
|
||||
<div class="col-sm-9"><input type="number" th:field="*{orderNr}" class="form-control" /></div>
|
||||
<div class="col-sm-3"> </div>
|
||||
<div class="col-sm-9">
|
||||
<button type="submit" class="btn btn-outline-primary">Übernehmen</button>
|
||||
<a th:href="@{/subject/list}" class="btn btn-outline-secondary">Abbrechen</a>
|
||||
<a th:href="@{/subject/{id}/delete(id=${bean.pkSubject})}" class="btn btn-outline-danger" th:if="${bean.pkSubject}">Löschen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
52
src/main/resources/templates/subject/list.html
Normal file
52
src/main/resources/templates/subject/list.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!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 class="borderdist">
|
||||
<table id="table" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Quelle</th>
|
||||
<th>Thema</th>
|
||||
<th>gehalten</th>
|
||||
<th>Reihenfolge</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:each="s : ${list}">
|
||||
<td th:text="${s.sourceName}"></td>
|
||||
<td>
|
||||
<div><span th:text="${s.theme}" style="font-weight: bolder"></span></div>
|
||||
<div th:text="${s.subtheme}"></div>
|
||||
</td>
|
||||
<td><div th:text="${#temporals.format(d, 'dd.MM.yyyy')}" th:each="d : ${s.slots}"></div></td>
|
||||
<td th:text="${s.orderNr}"></td>
|
||||
<td>
|
||||
<a th:href="@{/subject/{id}(id=${s.pkSubject})}" class="btn btn-outline-secondary"><i class="bi bi-pencil"></i></a>
|
||||
<a th:href="@{/subject/{id}/delete(id=${s.pkSubject})}" class="btn btn-outline-danger" th:if="${s.slots.length < 1}"><i class="bi bi-trash"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<a th:href="@{/subject/new}" class="btn btn-outline-primary">ein neues Thema anlegen</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<script th:inline="javascript">
|
||||
/*<![CDATA[*/
|
||||
$(document).ready(function() {
|
||||
$("#table").DataTable({
|
||||
"order" : [ [ 3, 'asc' ] ],
|
||||
"language" : locale_de
|
||||
});
|
||||
});
|
||||
/*]]>*/
|
||||
</script>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
@ -1,21 +0,0 @@
|
||||
<!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 class="borderdist">
|
||||
TODO: implement
|
||||
<pre>
|
||||
fields:
|
||||
fk_source
|
||||
theme
|
||||
subtheme
|
||||
book_pages
|
||||
worksheets
|
||||
bibleverse
|
||||
notes
|
||||
order_nr
|
||||
</pre>
|
||||
</div>
|
||||
</th:block>
|
||||
</body>
|
||||
</html>
|
@ -22,7 +22,8 @@
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarSupportedContent" style="margin-right: 20px">
|
||||
<ul class="navbar-nav mb-2 mb-lg-0">
|
||||
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/}" style="margin-left: 12px">Startseite</a></li>
|
||||
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/}" style="margin-left: 12px">Einteilung</a></li>
|
||||
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/subject/list}" style="margin-left: 12px">Themen</a></li>
|
||||
</ul>
|
||||
<ul layout:fragment="header"></ul>
|
||||
<ul class="nav navbar-nav ms-auto">
|
||||
|
Reference in New Issue
Block a user