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

56 lines
1.4 KiB
HTML
Raw Normal View History

2023-11-10 17:09:39 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" th:href="@{/resources/css/staff/style.css}" />
<title th:text="${title}"></title>
</head>
<body>
<div class="verwaltung">
<h1>Personalverwaltung</h1>
<h2>Mitarbeiterdetails</h2>
<table>
<tr>
<th>ID</th>
<th>Nachname</th>
<th>Vorname</th>
<th>Beruf</th>
</tr>
<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 />
<label for="surname">Nachname:</label>
<input type="text" id="surname" name="surname" required />
<label for="job">Beruf:</label>
<input type="text" id="job" name="job" required />
<button type="submit">Hinzufügen</button>
</form>
</div>
</body>
</html>