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

59 lines
1.7 KiB
HTML
Raw Normal View History

2023-11-10 17:09:39 +01:00
<!DOCTYPE html>
2023-11-13 20:09:39 +01:00
<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='Angestellte')}">
2023-11-10 17:09:39 +01:00
<head>
<link rel="stylesheet" th:href="@{/resources/css/staff/style.css}" />
<title th:text="${title}"></title>
</head>
<body>
2023-11-13 20:09:39 +01:00
<section layout:fragment="content">
<div class="verwaltung">
<h2>Mitarbeiterdetails</h2>
<table>
<tr>
<th>ID</th>
<th>Nachname</th>
<th>Vorname</th>
<th>Beruf</th>
</tr>
2023-11-10 17:09:39 +01:00
2023-11-13 20:09:39 +01:00
<tr th:each="staff : ${staffs}">
<td th:text="${staff.id}">01</td>
<td th:text="${staff.surname}">Musterkoch</td>
<td th:text="${staff.name}">Max</td>
<td th:text="${staff.job}">Koch</td>
<td>
<a th:href="@{'/staff/edit/' + ${staff.id}}" class="button"
>Bearbeiten</a
>
</td>
<td>
<form th:action="@{/staff/remove}" method="post">
<input type="hidden" th:name="staffID" th:value="${staff.id}" />
<button type="submit" class="delete-icon">Entfernen</button>
</form>
</td>
</tr>
</table>
</div>
<div class="add-staff-form">
<h2>Personal Hinzufügen</h2>
<form action="/staff/add" method="post">
<label for="name">Name:</label>
<input type="text" id="name" name="name" required />
2023-11-10 17:09:39 +01:00
2023-11-13 20:09:39 +01:00
<label for="surname">Nachname:</label>
<input type="text" id="surname" name="surname" required />
2023-11-10 17:09:39 +01:00
2023-11-13 20:09:39 +01:00
<label for="job">Beruf:</label>
<input type="text" id="job" name="job" required />
2023-11-10 17:09:39 +01:00
2023-11-13 20:09:39 +01:00
<button type="submit">Hinzufügen</button>
</form>
</div>
</section>
2023-11-10 17:09:39 +01:00
</body>
</html>