show current camps on start page

This commit is contained in:
Jottyfan
2022-10-01 22:28:08 +02:00
parent d15a6af941
commit cfe4edcf15
12 changed files with 402 additions and 10 deletions

View File

@ -0,0 +1,61 @@
<!DOCTYPE html>
<html th:replace="~{template :: layout(~{::title}, ~{::libs}, ~{::header}, ~{::content})}" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<title>Camp Organizer 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<libs></libs>
</head>
<body>
<header>
<a th:href="@{/}" class="btn btn-secondary btn-icon-silent" title="aktualisieren"><i class="fas fa-sync"></i></a>
<span>Das Buchungsportal dess Onkel Werner Freizeiten e.V.</span>
</header>
<content>
<div class="mainpage">
<script type="text/javascript">
var mytoggle = new MyToggle();
</script>
<h1>Unsere Freizeiten</h1>
<div class="card bottomdist16" th:each="c : ${camps}">
<div class="card-header mytoggle_btn" th:onclick="mytoggle.toggle('campdiv_[[${c.pk}]]')">
<span th:text="${c.name}"></span>&nbsp;<span th:text="${#numbers.formatInteger(c.year, 0)}" th:if="${c.year != null}"></span>
</div>
<div th:id="'campdiv_' + ${c.pk}" class="card-body mytoggle_collapsed">
<div class="container">
<div class="row">
<div class="col-sm-3">Ort</div>
<div class="col-sm-9">
<a th:href="${c.url}" th:text="${c.locationName}" target="_blank"></a>
</div>
</div>
<div class="row">
<div class="col-sm-3">Jungen und Mädchen</div>
<div class="col-sm-9" th:text="${c.minAge} + ' - ' + ${c.maxAge}"></div>
</div>
<div class="row">
<div class="col-sm-3">Zeit</div>
<div class="col-sm-9">
<span th:text="${#temporals.format(c.arrive, 'dd.MM.')} + ' - ' + ${#temporals.format(c.depart, 'dd.MM.yyyy')}" th:if="${c.arrive != null && c.depart != null}"></span>
</div>
</div>
<div class="row">
<div class="col-sm-3">Preis</div>
<div class="col-sm-9" th:text="${c.price}"></div>
</div>
<div class="row">
<div class="col-sm-3">Ferien</div>
<div class="col-sm-9" th:text="${c.countries}"></div>
</div>
<div class="row">
<div class="col-sm-3"></div>
<div class="col-sm-9">
<button class="btn btn-primary">jetzt anmelden</button>
</div>
</div>
</div>
</div>
</div>
</div>
</content>
</body>
</html>