<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="ISO-8859-1">
<title>Employee Management System</title>

<link rel="stylesheet"
	href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
	integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO"
	crossorigin="anonymous">
	
</head>
<body>

	<div class="container my-2">
	<h1>Svi korisnici</h1>

	
		<table border="1" class = "table table-striped table-responsive-md">
			<thead>
				<tr>
					<th>
						<a th:href="@{'/page/' + ${currentPage} + '?sortField=firstName&sortDir=' + ${reverseSortDir}}">
							Ime</a>
					</th>
					<th>
					<a th:href="@{'/page/' + ${currentPage} + '?sortField=lastName&sortDir=' + ${reverseSortDir}}">
							Prezime</a>
					</th>
					<th>
					<a th:href="@{'/page/' + ${currentPage} + '?sortField=email&sortDir=' + ${reverseSortDir}}">
							E-mail</a>
					</th>
					<th> Brisanje </th>
				</tr>
			</thead>
			<tbody>
				<tr th:each="Korisnik: ${korisnici}">
					<td th:text="${Korisnik.ime}"></td>
					<td th:text="${Korisnik.prezime}"></td>
					<td th:text="${Korisnik.email}"></td>
					<td> 
					    <a th:href="@{/adminKorisnik/obrisiKorisnika/{id}(id=${Korisnik.id})}" class="btn btn-danger">Ukloni</a>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</body>
</html>