show current camps on start page
This commit is contained in:
20
src/main/resources/templates/error.html
Normal file
20
src/main/resources/templates/error.html
Normal file
@ -0,0 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
|
||||
<head>
|
||||
<title>Fehler</title>
|
||||
<link th:rel="stylesheet" th:href="@{/css/style.css}" />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap/5.1.3/css/bootstrap.min.css} " />
|
||||
<script th:src="@{/webjars/bootstrap/5.1.3/js/bootstrap.min.js}"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="middlecenter">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<p>Es ist ein Fehler aufgetreten.</p>
|
||||
<a th:href="@{/}" class="linkbtn">Ach, Mist...</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
61
src/main/resources/templates/index.html
Normal file
61
src/main/resources/templates/index.html
Normal 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> <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>
|
33
src/main/resources/templates/template.html
Normal file
33
src/main/resources/templates/template.html
Normal file
@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html th:fragment="layout (title, libs, header, content)" xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title th:replace="${title}">Camp Organizer Business</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/bootstrap/5.2.0/css/bootstrap.min.css} " />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/font-awesome/5.15.4/css/all.css} " />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/datatables/1.11.4/css/jquery.dataTables.min.css}" />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/webjars/select2/4.0.13/css/select2.min.css}" />
|
||||
<link th:rel="stylesheet" type="text/css" media="all" th:href="@{/css/style.css}" />
|
||||
<script th:src="@{/webjars/jquery/3.6.0/jquery.min.js}"></script>
|
||||
<script th:src="@{/webjars/bootstrap/5.2.0/js/bootstrap.bundle.min.js}"></script>
|
||||
<script th:src="@{/webjars/datatables/1.11.4/js/jquery.dataTables.min.js}"></script>
|
||||
<script th:src="@{/webjars/select2/4.0.13/js/select2.full.min.js}"></script>
|
||||
<script th:src="@{/js/dataTables.de.js}"></script>
|
||||
<script th:src="@{/js/mytoggle.js}"></script>
|
||||
<meta th:replace="${libs}"></meta>
|
||||
</head>
|
||||
<body>
|
||||
<div class="myheadline">
|
||||
<div class="topright linkbtn">
|
||||
<span th:if="${not #strings.isEmpty(currentUser)}">
|
||||
<b th:inline="text">[[${currentUser}]]</b> aus Version <span th:text="${@manifestBean.getVersion()}"></span> <a th:href="@{/logout}">ausloggen</a>
|
||||
</span>
|
||||
<span th:if="${#strings.isEmpty(currentUser)}">
|
||||
<a th:href="@{/user}">einloggen</a>
|
||||
</span>
|
||||
</div>
|
||||
<span th:replace="${header}">Layout header</span>
|
||||
</div>
|
||||
<div th:replace="${content}">Layout content</div>
|
||||
</body>
|
||||
</html>
|
61
src/main/resources/templates/user/index.html
Normal file
61
src/main/resources/templates/user/index.html
Normal 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> <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>
|
Reference in New Issue
Block a user