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>
<link rel="stylesheet" th:href="@{/resources/css/style.css}">
</head>
<body>
2023-11-13 20:09:39 +01:00
<section layout:fragment="content">
<div>
<table style="width: 100%;">
<tr style="text-align: left;">
<th></th>
<th>Name</th>
<th>Mindestzeitraum</th>
<th>Basisausstattung</th>
<th>Preis ab</th>
</tr>
<tr th:each="catalogEntry : ${catalogEntries}">
<td>
**BILD**
</td>
<td th:text="${catalogEntry.getEventType()}">
<td th:text="${catalogEntry.getMinimumTimePeriod()}">h
<td>
<ul th:each="product : ${catalogEntry.getProducts()}">
<li th:text="${product}"/>
</ul>
</td>
<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()}">
<button type="submit">Entfernen</button>
</form>
</td>
</tr>
</table>
</div>
<div sec:authorize="hasRole('ADMIN')">
2023-11-13 20:09:39 +01:00
<form th:action="@{/catalog_editor}">
<button type="submit">Hinzufügen</button>
</form>
</div>
</section>
2023-11-05 09:38:25 +01:00
</body>
</html>