added download csv file feature

This commit is contained in:
Jottyfan
2023-10-21 18:53:14 +02:00
parent b3a089d6b3
commit e0e972cfe8
9 changed files with 141 additions and 19 deletions

View File

@ -7,6 +7,10 @@
<body>
<th:block layout:fragment="content">
<div sec:authorize="hasRole('registrator')" style="margin: 8px">
<div class="btn-group" role="group">
<a class="btn btn-outline-primary" role="button" th:href="@{/confirmation/board/download/{id}(id=${campId})}"><i class="fas fa-download"></i>&nbsp;alles als CSV exportieren</a>
</div>
<br />
<table id="table" class="table table-striped">
<thead>
<tr>
@ -25,20 +29,16 @@
</thead>
<tbody>
<tr th:each="p : ${persons}">
<td th:text="${p.paid}"></td>
<td th:text="${#strings.replace(#numbers.formatCurrency(p.paid), '¤', '€')}"></td>
<td th:text="${p.forename}"></td>
<td th:text="${p.surname}"></td>
<td><div th:text="${p.street}"></div>
<span th:text="${p.zip}"></span>&nbsp;<span th:text="${p.city}"></span>
</td>
<td><div th:text="${p.street}"></div> <span th:text="${p.zip}"></span>&nbsp;<span th:text="${p.city}"></span></td>
<td><div th:text="'Tel.: ' + ${p.phone}"></div>
<div th:text="${p.email}"></div>
</td>
<div th:text="${p.email}"></div></td>
<td><div th:text="${p.sex == 'male' ? 'männlich' : 'weiblich'}"></div>
<div th:text="${p.camprolle}"></div></td>
<div th:text="${p.camprolle}"></div></td>
<td><div th:text="${#temporals.format(p.birthDate, 'dd.MM.yyyy')}"></div>
<div th:text="${p.getAge(p.birthDate)} + ' Jahre'"></div>
</td>
<div th:text="${p.getAge(campStartDate)} + ' Jahre'"></div></td>
<td th:text="${p.accept}"></td>
<td th:text="${#temporals.format(p.created, 'dd.MM.yyyy HH:mm')}"></td>
<td><span th:text="${p.consentCatalogPhoto ? 'ja' : 'nein'}" th:if="${p.consentCatalogPhoto}"></span></td>