Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
53 lines (47 sloc) 2.39 KB
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<script th:src="@{/webjars/jquery/jquery.min.js}"></script>
<script th:src="@{/resources/js/guestbook.js}"></script>
<link rel="stylesheet" th:href="@{/webjars/bootstrap/css/bootstrap.min.css}" type="text/css" />
<link rel="stylesheet" th:href="@{/resources/css/style.css}" type="text/css" />
<title th:text="#{guestbook.title}">Gästebuch</title>
</head>
<body>
<h1 class="text-center" th:text="#{guestbook.title}">Gästebuch</h1>
<div class="checkbox text-center">
<input type="checkbox" id="use_ajax" />
<label for="use_ajax" th:text="#{guestbook.useajax}">Ajax nutzen</label>
</div>
<div id="entries">
<div th:each="entry, it : ${entries}" th:with="index = ${it.count}">
<div class="panel panel-default" th:fragment="entry" th:id="entry+${entry.id}">
<div class="panel-heading" >
<form th:method="delete" th:action="@{/guestbook/} + ${entry.id}" th:attr="data-entry-id=${entry.id}">
<button class="btn btn-default pull-right" >
<span class="glyphicon glyphicon-remove"></span>
</button>
</form>
<h3 th:text="${index} + '. ' + ${entry.name}">1. Posting</h3>
</div>
<div class="panel-body">
<blockquote class="entrytext" th:text="${entry.text}"></blockquote>
<footer class="date" th:text="${#temporals.format(entry.date, 'dd. MMMM yyyy - HH:mm')}">Datum</footer>
</div>
</div>
</div>
</div>
<form method="post" role="form" class="gb-form" id="form" th:action="@{/guestbook}" th:object="${form}">
<div class="form-group">
<label for="name" th:text="#{guestbook.form.name}">Name</label><br />
<input class="form-control" type="text" th:field="*{name}" th:errorclass="fieldError" required="required" /><br />
</div>
<div class="form-group">
<label for="text" th:text="#{guestbook.form.text}">Text</label><br />
<textarea th:field="*{text}" th:errorclass="fieldError" class="form-control" required="required"></textarea><br />
</div>
<input type="submit" class="btn btn-default" th:value="#{guestbook.form.submit}" value="Senden" />
</form>
</body>
</html>