fixed damaged deleting slots, see #5

This commit is contained in:
Jottyfan
2024-11-11 23:03:21 +01:00
parent a1ad23920a
commit bf88306d85
12 changed files with 59 additions and 25 deletions

View File

@ -30,7 +30,8 @@
<div class="col-sm-9">
<button type="submit" class="btn btn-outline-success">Speichern</button>&nbsp;
<a th:href="@{/}" class="btn btn-outline-secondary">Abbrechen</a>&nbsp;
<a th:href="@{/lesson/{id}/remove(id=${bean.pkLesson})}" class="btn btn-outline-danger">Löschen</a>
<a th:href="@{/lesson/{id}/remove(id=${bean.pkLesson})}" class="btn btn-outline-danger">Zuordnung löschen</a>
<a th:href="@{/slot/{id}(id=${bean.fkSlot})}" class="btn btn-outline-warning">Termin bearbeiten</a>
</div>
</div>
</form>

View File

@ -14,7 +14,7 @@
</thead>
<tbody>
<tr th:each="s : ${list}">
<td th:data-sort="${#temporals.format(s.slotDay, 'yyyy-MM-dd')}"><span th:text="${#temporals.format(s.slotDay, 'dd.MM.yyyy')}"></span></td>
<td th:data-sort="${#temporals.format(s.slotDay, 'yyyy-MM-dd')}"><a th:href="@{/slot/{id}(id=${s.pkSlot})}" th:text="${#temporals.format(s.slotDay, 'dd.MM.yyyy')}"></a></td>
<td><a th:href="@{/lesson?slotId={id}(id=${s.pkSlot})}" class="btn btn-outline-secondary"> <span th:text="${s.abbreviation}" th:if="${s.abbreviation}"></span> <i
class="bi bi-pencil" th:if="${s.abbreviation == null || s.abbreviation.isBlank()}"></i>
</a></td>
@ -32,8 +32,7 @@
</div>
</div>
</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>
<td><span th:text="${s.slotNotes}" class="rightpadding64"></span></td>
</tr>
</tbody>
<tfoot>

View File

@ -24,7 +24,7 @@
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent" style="margin-right: 20px">
<ul class="navbar-nav mb-2 mb-lg-0" th:if="${hasBUrole || hasDateRole}">
<ul class="navbar-nav mb-2 mb-lg-0" th:if="${hasAnyRole}">
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/next}" style="margin-left: 12px">Dienstplan</a></li>
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/sheet}" style="margin-left: 12px" th:if="${hasBUrole}">Einteilung</a></li>
<li class="nav-item"><a class="btn btn-outline-secondary" th:href="@{/subject/list}" style="margin-left: 12px" th:if="${hasBUrole}">Themen</a></li>
@ -47,8 +47,8 @@
</ul>
</div>
</nav>
<div layout:fragment="content" th:if="${hasBUrole || hasDateRole}">content</div>
<div th:unless="${hasBUrole || hasDateRole}">
<div layout:fragment="content" th:if="${hasAnyRole}">content</div>
<div th:unless="${hasAnyRole}">
<div class="borderdist">
<div class="alert alert-danger">Leider fehlen Ihnen die Berechtigungen, um diese Anwendung nutzen zu können.</div>
</div>