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

57 lines
1.6 KiB
HTML
Raw Normal View History

2023-11-10 17:09:39 +01:00
<!DOCTYPE html>
<html
xmlns:th="http://www.thymeleaf.org"
2023-11-13 20:09:39 +01:00
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html(title='Angestellte')}"
>
<head> </head>
2023-11-10 17:09:39 +01:00
<body>
2023-11-15 17:27:04 +01:00
<div layout:fragment="content">
<div>
2023-11-13 20:09:39 +01:00
<h2>Mitarbeiterdetails</h2>
2023-11-15 17:27:04 +01:00
<table class="table">
2023-11-13 20:09:39 +01:00
<tr>
<th>Name</th>
2023-11-13 20:09:39 +01:00
<th>Beruf</th>
2023-11-15 17:27:04 +01:00
<th></th>
<th></th>
2023-11-13 20:09:39 +01:00
</tr>
2023-11-10 17:09:39 +01:00
<tr th:each="staff : ${staff}">
2023-11-13 20:09:39 +01:00
<td th:text="${staff.name}">Max</td>
<td th:text="${staff.job}">Koch</td>
<td>
<a th:href="@{'/staff/edit/' + ${staff.id}}"
><button class="btn btn-warning">Bearbeiten</button></a
>
2023-11-13 20:09:39 +01:00
</td>
<td>
<form th:action="@{/staff/remove}" method="post">
2023-11-23 16:42:56 +01:00
<input type="hidden" th:name="id" th:value="${staff.id}" />
2023-11-15 17:27:04 +01:00
<button type="submit" class="btn btn-danger">Entfernen</button>
2023-11-13 20:09:39 +01:00
</form>
</td>
</tr>
</table>
</div>
2023-11-15 17:27:04 +01:00
<div>
2023-11-13 20:09:39 +01:00
<h2>Personal Hinzufügen</h2>
<form action="/staff/add" method="post">
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="name">Name</label>
<input class="form-control" type="text" name="name" required />
</div>
<div class="mb-3">
2023-11-21 16:02:42 +01:00
<label class="form-label" for="job">Beruf:</label>
<select name="job" class="form-select">
<option th:each="type : ${T(catering.staff.JobType).values()}" th:value="${type}" th:text="${type}" required></option>
</select>
2023-11-15 17:27:04 +01:00
</div>
<button class="btn btn-primary" type="submit">Hinzufügen</button>
2023-11-13 20:09:39 +01:00
</form>
</div>
2023-11-15 17:27:04 +01:00
</div>
2023-11-10 17:09:39 +01:00
</body>
</html>