mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-30 19:03:42 +02:00
50 lines
1.4 KiB
HTML
50 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorate="~{layout.html(title='Katalog')}">
|
|
<head>
|
|
</head>
|
|
<body>
|
|
<div layout:fragment="content">
|
|
<div>
|
|
<table class="table">
|
|
<tr>
|
|
<th></th>
|
|
<th>Name</th>
|
|
<th>Mindestzeitraum</th>
|
|
<th>Basisausstattung</th>
|
|
<th>Preis ab</th>
|
|
<th></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.getKey().toString()} + ': ' + ${product.getValue().toString()}"/>
|
|
</ul>
|
|
</td>
|
|
<td th:text="${catalogEntry.getTotalCost()} + ' €'">
|
|
<td sec:authorize="hasRole('ADMIN')">
|
|
<form method="post" th:action="@{/catalog/remove}">
|
|
<input type="hidden" name="catalogEntryID" th:value="${catalogEntry.getId()}">
|
|
<button class="btn btn-danger" type="submit">Entfernen</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
|
|
<div sec:authorize="hasRole('ADMIN')">
|
|
<a th:href="@{/catalog_editor}">
|
|
<button class="btn btn-success" type="submit">Hinzufügen</button>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|