Add support for Thymeleaf 3 while keeping Thymeleaf 2 as the default
Closes gh-4393
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
# Allow Thymeleaf templates to be reloaded at dev time
|
||||
spring.thymeleaf.cache: false
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
9404
spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/static/js/jquery-1.7.2.js
vendored
Normal file
9404
spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/static/js/jquery-1.7.2.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1250
spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/static/js/jquery.validate.js
vendored
Normal file
1250
spring-boot-samples/spring-boot-sample-web-thymeleaf3/src/main/resources/static/js/jquery.validate.js
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
|
||||
<head>
|
||||
<title>Layout</title>
|
||||
<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"
|
||||
href="../../css/bootstrap.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand"
|
||||
href="https://github.com/ultraq/thymeleaf-layout-dialect">
|
||||
Thymeleaf - Layout </a>
|
||||
<ul class="nav">
|
||||
<li><a th:href="@{/}" href="messages.html"> Messages </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<h1 layout:fragment="header">Layout</h1>
|
||||
<div layout:fragment="content">Fake content</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,34 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
|
||||
layout:decorate="layout">
|
||||
<head>
|
||||
<title>Messages : Create</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 layout:fragment="header">Messages : Create</h1>
|
||||
<div layout:fragment="content" class="container">
|
||||
<form id="messageForm" th:action="@{/(form)}" th:object="${message}"
|
||||
action="#" method="post">
|
||||
<div th:if="${#fields.hasErrors('*')}" class="alert alert-error">
|
||||
<p th:each="error : ${#fields.errors('*')}" th:text="${error}">
|
||||
Validation error</p>
|
||||
</div>
|
||||
<div class="pull-right">
|
||||
<a th:href="@{/}" href="messages.html"> Messages </a>
|
||||
</div>
|
||||
<input type="hidden" th:field="*{id}"
|
||||
th:class="${#fields.hasErrors('id')} ? 'field-error'" /> <label
|
||||
for="summary">Summary</label> <input type="text"
|
||||
th:field="*{summary}"
|
||||
th:class="${#fields.hasErrors('summary')} ? 'field-error'" /> <label
|
||||
for="text">Message</label>
|
||||
<textarea th:field="*{text}"
|
||||
th:class="${#fields.hasErrors('text')} ? 'field-error'"></textarea>
|
||||
<div class="form-actions">
|
||||
<input type="submit" value="Save" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
|
||||
layout:decorate="layout">
|
||||
<head>
|
||||
<title>Messages : View all</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 layout:fragment="header">Messages : View all</h1>
|
||||
<div layout:fragment="content" class="container">
|
||||
<div class="pull-right">
|
||||
<a href="form.html" th:href="@{/(form)}">Create Message</a>
|
||||
</div>
|
||||
<table class="table table-bordered table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td>Created</td>
|
||||
<td>Summary</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr th:if="${messages.empty}">
|
||||
<td colspan="3">No messages</td>
|
||||
</tr>
|
||||
<tr th:each="message : ${messages}">
|
||||
<td th:text="${message.id}">1</td>
|
||||
<td th:text="${#calendars.format(message.created)}">July 11,
|
||||
2012 2:17:16 PM CDT</td>
|
||||
<td><a href="view.html" th:href="@{'/' + ${message.id}}"
|
||||
th:text="${message.summary}"> The summary </a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,35 @@
|
||||
<html xmlns:th="http://www.thymeleaf.org"
|
||||
xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
|
||||
layout:decorate="layout">
|
||||
<head>
|
||||
<title>Messages : View</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1 layout:fragment="header">Messages : Create</h1>
|
||||
<div layout:fragment="content" class="container">
|
||||
<div class="alert alert-success" th:if="${globalMessage}"
|
||||
th:text="${globalMessage}">Some Success message</div>
|
||||
<div class="pull-right">
|
||||
<a th:href="@{/}" href="list.html"> Messages </a>
|
||||
</div>
|
||||
<dl>
|
||||
<dt>ID</dt>
|
||||
<dd id="id" th:text="${message.id}">123</dd>
|
||||
<dt>Date</dt>
|
||||
<dd id="created" th:text="${#calendars.format(message.created)}">
|
||||
July 11, 2012 2:17:16 PM CDT</dd>
|
||||
<dt>Summary</dt>
|
||||
<dd id="summary" th:text="${message.summary}">A short summary...
|
||||
</dd>
|
||||
<dt>Message</dt>
|
||||
<dd id="text" th:text="${message.text}">A detailed message that
|
||||
is longer than the summary.</dd>
|
||||
</dl>
|
||||
<div class="pull-left">
|
||||
<a href="messages" th:href="@{'/delete/' + ${message.id}}">
|
||||
delete </a> | <a href="form.html"
|
||||
th:href="@{'/modify/' + ${message.id}}"> modify </a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user