swt23w23/src/main/resources/templates/catalog.html

50 lines
1.4 KiB
HTML
Raw Normal View History

2023-11-05 09:38:25 +01:00
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
2023-11-13 20:09:39 +01:00
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html(title='Katalog')}">
2023-11-05 09:38:25 +01:00
<head>
</head>
<body>
2023-11-15 17:27:04 +01:00
<div layout:fragment="content">
2023-11-13 20:09:39 +01:00
<div>
2023-11-15 17:27:04 +01:00
<table class="table">
<tr>
2023-11-13 20:09:39 +01:00
<th></th>
<th>Name</th>
<th>Mindestzeitraum</th>
<th>Basisausstattung</th>
<th>Preis ab</th>
2023-11-15 17:27:04 +01:00
<th></th>
2023-11-13 20:09:39 +01:00
</tr>
<tr th:each="catalogEntry : ${catalogEntries}">
<td>
**BILD**
</td>
<td th:text="${catalogEntry.getEventType()}">
2023-11-25 15:31:07 +01:00
<td th:text="${catalogEntry.getMinimumTimePeriod()} + ' h'">
2023-11-13 20:09:39 +01:00
<td>
<ul th:each="product : ${catalogEntry.getProducts()}">
<li th:text="${product.getKey().toString()} + ': ' + ${product.getValue().toString()}"/>
2023-11-13 20:09:39 +01:00
</ul>
</td>
2023-11-25 15:31:07 +01:00
<td th:text="${catalogEntry.getTotalCost()} + ' €'">
<td sec:authorize="hasRole('ADMIN')">
2023-11-13 20:09:39 +01:00
<form method="post" th:action="@{/catalog/remove}">
<input type="hidden" name="catalogEntryID" th:value="${catalogEntry.getId()}">
2023-11-15 17:27:04 +01:00
<button class="btn btn-danger" type="submit">Entfernen</button>
2023-11-13 20:09:39 +01:00
</form>
</td>
</tr>
</table>
</div>
<div sec:authorize="hasRole('ADMIN')">
2023-11-15 17:27:04 +01:00
<a th:href="@{/catalog_editor}">
<button class="btn btn-success" type="submit">Hinzufügen</button>
</a>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
</div>
2023-11-05 09:38:25 +01:00
</body>
</html>