swt23w23/src/main/resources/templates/customers.html
Simon Bruder 0f4b174460
Remove duplicate title elements
The title element should only be set by the layout template.
2023-11-21 18:00:35 +01:00

34 lines
1 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='Kunden')}">
<head>
</head>
<body>
<div layout:fragment="content">
<div>
<h1>Kundenverwaltung</h1>
<table class="table">
<tr>
<th>Nutzername</th>
<th>Aufträge</th>
<th>Bearbeiten</th>
<th>Entfernen</th>
</tr>
<tr th:each="customer : ${customers}">
<td th:text="${customer.username}">Musterkoch</td>
<td>Aufträge</td>
<td><a th:href="@{/customers/edit/{id}(id=${customer.id})}"><button class="btn btn-warning">Bearbeiten</button></a></td>
<td>
<a th:if="${customer.isEnabled}" th:href="@{/customers/remove/{id}(id=${customer.id})}"><button class="btn btn-danger">Entfernen</button></a>
<b th:if="${!customer.isEnabled}">Deaktiviert</b>
</td>
</td>
</tr>
</table>
</div>
</div>
</body>
</html>