Files
BiCO/src/main/resources/templates/theme.html
2025-12-15 21:12:29 +01:00

85 lines
3.4 KiB
HTML

<!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="container" sec:authorize="hasRole('Bibelunterricht')">
<div class="row g-2">
<h1>
Themen für den <span th:text="${#temporals.format(day, 'dd.MM.yyyy')}"></span>
</h1>
</div>
<th:block th:each="b : ${list}" th:if="${list.size() > 0}">
<div class="row g-2 blockframe">
<div class="col-sm-3">Thema:</div>
<div class="col-sm-8">
<span th:text="${b.theme}"></span>
</div>
<div class="col-sm-1">
<div class="dropdown">
<button class="btn btn-outline-danger dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
<i class="bi bi-trash"></i>
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" th:href="@{/theme/delete?lessonSubjectId={id}&slotId={s}(id=${b.pkLessonSubject},s=${slotId})}">ja, endgültig verwerfen</a></li>
</ul>
</div>
</div>
<div class="col-sm-3" th:if="${b.subtheme}">Unterthema:</div>
<div class="col-sm-9" th:if="${b.subtheme}">
<span th:text="${b.subtheme}"></span>
</div>
<div class="col-sm-3" th:if="${b.bookPages}">Buchseiten:</div>
<div class="col-sm-9" th:if="${b.bookPages}">
<span th:text="${b.bookPages}"></span>
</div>
<div class="col-sm-3" th:if="${b.worksheets}">Arbeitsblätter:</div>
<div class="col-sm-9" th:if="${b.worksheets}">
<span th:text="${b.worksheets}"></span>
</div>
<div class="col-sm-3" th:if="${b.bibleverse}">Bibelvers (Lernvers):</div>
<div class="col-sm-9" th:if="${b.bibleverse}">
<span th:text="${b.bibleverse}"></span>
</div>
<div class="col-sm-3" th:if="${b.notes}">Anmerkungen zum Thema:</div>
<div class="col-sm-9" th:if="${b.notes}">
<span th:text="${b.notes}"></span>
</div>
<div class="col-sm-3">Quelle:</div>
<div class="col-sm-9">
<span th:text="${b.sourceName}"></span>
</div>
</div>
</th:block>
<form th:action="@{/theme/update?slotId={id}(id=${slotId})}" method="post" th:object="${lesson}" th:if="${lesson}">
<input type="hidden" th:field="*{pkLesson}" />
<div class="row g-2 blockframe">
<div class="col-sm-3">Anmerkungen zur Stunde</div>
<div class="col-sm-9">
<textarea th:field="*{notes}" class="form-control"></textarea>
</div>
<div class="col-sm-3">&nbsp;</div>
<div class="col-sm-9">
<button type="submit" class="btn btn-outline-primary">Übernehmen</button>
<button type="reset" class="btn btn-outline-secondary">Verwerfen</button>
</div>
</div>
</form>
<form th:action="@{/theme/add?slotId={id}(id=${slotId})}" method="post">
<div class="row g-2">
<div class="col-sm-3">ein Thema hinzufügen</div>
<div class="col-sm-7">
<select name="pkSubject" class="form-select">
<option th:each="t : ${themes}" th:value="${t.key}" th:text="${t.value}"></option>
</select>
</div>
<div class="col-sm-2">
<button type="submit" class="btn btn-outline-primary">hinzufügen</button>
</div>
</div>
</form>
</div>
</div>
</th:block>
</body>
</html>