<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" layout:decorate="~{template}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<title>Camp Organizer Business</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
	<th:block layout:fragment="content">
		<div class="mainpage">
			<div class="card" style="width: 640px">
				<div class="card-header">Finanzübersicht über alle Freizeiten</div>
				<div class="card-body">
					<table id="camps" class="table table-striped">
						<thead>
							<tr>
								<th scope="col">Jahr</th>
								<th scope="col">Freizeit</th>
								<th scope="col">Kontostand</th>
							</tr>
						</thead>
						<tbody>
							<th:block th:each="b : ${campBudgets}" sec:authorize="hasRole('business')">
								<tr>
									<td th:text="${#numbers.formatDecimal(b.campYear, 1, 0)}"></td>
									<td><a th:href="@{/business/camp/{id}(id=${b.campId})}" th:text="${b.campName}" class="tablelink" title="Freizeitübersicht laden"></a></td>
									<td th:text="${#numbers.formatDecimal(b.budget, 1, 2) + ' €'}"></td>
								</tr>
							</th:block>
						</tbody>
					</table>
					<script>
						$(document).ready(function() {
							$("#camps").DataTable({
								language : locale_de
							});
						});
					</script>
				</div>
			</div>
		</div>
	</th:block>
</body>
</html>