Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
7f8aff02
Commit
7f8aff02
authored
Dec 11, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format HTML in web-ui sample
parent
2f84cdc7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
124 additions
and
170 deletions
+124
-170
layout.html
...ot-sample-web-ui/src/main/resources/templates/layout.html
+23
-30
form.html
...le-web-ui/src/main/resources/templates/messages/form.html
+32
-45
list.html
...le-web-ui/src/main/resources/templates/messages/list.html
+35
-43
view.html
...le-web-ui/src/main/resources/templates/messages/view.html
+34
-52
No files found.
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/layout.html
View file @
7f8aff02
<!DOCTYPE html>
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
>
<html
xmlns:th=
"http://www.thymeleaf.org"
<head>
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
>
<title>
Layout
</title>
<head>
<link
rel=
"stylesheet"
<title>
Layout
</title>
th:href=
"@{/css/bootstrap.min.css}"
<link
rel=
"stylesheet"
th:href=
"@{/css/bootstrap.min.css}"
href=
"../../css/bootstrap.min.css"
/>
href=
"../../css/bootstrap.min.css"
/>
</head>
</head>
<body>
<body>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"navbar"
>
<div
class=
"navbar"
>
<div
class=
"navbar-inner"
>
<div
class=
"navbar-inner"
>
<a
class=
"brand"
<a
class=
"brand"
href=
"https://github.com/ultraq/thymeleaf-layout-dialect"
>
href=
"https://github.com/ultraq/thymeleaf-layout-dialect"
>
Thymeleaf - Layout
Thymeleaf - Layout
</a>
</a>
<ul
class=
"nav"
>
<ul
class=
"nav"
>
<li><a
th:href=
"@{/}"
href=
"messages.html"
>
Messages
</a></li>
<li>
</ul>
<a
th:href=
"@{/}"
href=
"messages.html"
>
</div>
Messages
</div>
</a>
<h1
layout:fragment=
"header"
>
Layout
</h1>
</li>
<div
layout:fragment=
"content"
>
Fake content
</div>
</ul>
</div>
</div>
</body>
</div>
<h1
layout:fragment=
"header"
>
Layout
</h1>
<div
layout:fragment=
"content"
>
Fake content
</div>
</div>
</body>
</html>
</html>
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/form.html
View file @
7f8aff02
<!DOCTYPE html>
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
layout:decorator=
"layout"
>
<head>
<head>
<title>
Messages : Create
</title>
<title>
Messages : Create
</title>
</head>
</head>
<body>
<body>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<div
layout:fragment=
"content"
<div
layout:fragment=
"content"
class=
"container"
>
class=
"container"
>
<form
id=
"messageForm"
th:action=
"@{/(form)}"
th:object=
"${message}"
<form
id=
"messageForm"
action=
"#"
method=
"post"
>
th:action=
"@{/(form)}"
<div
th:if=
"${#fields.hasErrors('*')}"
class=
"alert alert-error"
>
th:object=
"${message}"
<p
th:each=
"error : ${#fields.errors('*')}"
th:text=
"${error}"
>
action=
"#"
Validation error
</p>
method=
"post"
>
</div>
<div
th:if=
"${#fields.hasErrors('*')}"
<div
class=
"pull-right"
>
class=
"alert alert-error"
>
<a
th:href=
"@{/}"
href=
"messages.html"
>
Messages
</a>
<p
th:each=
"error : ${#fields.errors('*')}"
</div>
th:text=
"${error}"
>
<input
type=
"hidden"
th:field=
"*{id}"
Validation error
th:class=
"${#fields.hasErrors('id')} ? 'field-error'"
/>
<label
</p>
for=
"summary"
>
Summary
</label>
<input
type=
"text"
</div>
th:field=
"*{summary}"
<div
class=
"pull-right"
>
th:class=
"${#fields.hasErrors('summary')} ? 'field-error'"
/>
<label
<a
th:href=
"@{/}"
href=
"messages.html"
>
for=
"text"
>
Message
</label>
Messages
<textarea
th:field=
"*{text}"
</a>
th:class=
"${#fields.hasErrors('text')} ? 'field-error'"
></textarea>
</div>
<div
class=
"form-actions"
>
<input
type=
"hidden"
<input
type=
"submit"
value=
"Save"
/>
th:field=
"*{id}"
</div>
th:class=
"${#fields.hasErrors('id')} ? 'field-error'"
</form>
/>
</div>
<label
for=
"summary"
>
Summary
</label>
</body>
<input
type=
"text"
</html>
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>
\ No newline at end of file
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/list.html
View file @
7f8aff02
<!DOCTYPE html>
<!DOCTYPE html>
<html
xmlns:th=
"http://www.thymeleaf.org"
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
layout:decorator=
"layout"
>
<head>
<head>
<title>
Messages : View all
</title>
<title>
Messages : View all
</title>
</head>
</head>
<body>
<body>
<h1
layout:fragment=
"header"
>
Messages : View all
</h1>
<h1
layout:fragment=
"header"
>
Messages : View all
</h1>
<div
layout:fragment=
"content"
class=
"container"
>
<div
layout:fragment=
"content"
class=
"container"
>
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<a
href=
"form.html"
th:href=
"@{/(form)}"
>
Create Message
</a>
<a
href=
"form.html"
th:href=
"@{/(form)}"
>
Create Message
</a>
</div>
</div>
<table
class=
"table table-bordered table-striped"
>
<table
class=
"table table-bordered table-striped"
>
<thead>
<thead>
<tr>
<tr>
<td>
ID
</td>
<td>
ID
</td>
<td>
Created
</td>
<td>
Created
</td>
<td>
Summary
</td>
<td>
Summary
</td>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
<tr
th:if=
"${messages.empty}"
>
<tr
th:if=
"${messages.empty}"
>
<td
colspan=
"3"
>
<td
colspan=
"3"
>
No messages
</td>
No messages
</tr>
</td>
<tr
th:each=
"message : ${messages}"
>
</tr>
<td
th:text=
"${message.id}"
>
1
</td>
<tr
th:each=
"message : ${messages}"
>
<td
th:text=
"${#calendars.format(message.created)}"
>
July 11,
<td
th:text=
"${message.id}"
>
1
</td>
2012 2:17:16 PM CDT
</td>
<td
th:text=
"${#calendars.format(message.created)}"
>
<td><a
href=
"view.html"
th:href=
"@{'/' + ${message.id}}"
July 11, 2012 2:17:16 PM CDT
th:text=
"${message.summary}"
>
The summary
</a></td>
</td>
</tr>
<td>
</tbody>
<a
href=
"view.html"
</table>
th:href=
"@{'/' + ${message.id}}"
</div>
th:text=
"${message.summary}"
>
</body>
The summary
</html>
</a>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
\ No newline at end of file
spring-boot-samples/spring-boot-sample-web-ui/src/main/resources/templates/messages/view.html
View file @
7f8aff02
<html
xmlns:th=
"http://www.thymeleaf.org"
<html
xmlns:th=
"http://www.thymeleaf.org"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
xmlns:layout=
"http://www.ultraq.net.nz/web/thymeleaf/layout"
layout:decorator=
"layout"
>
layout:decorator=
"layout"
>
<head>
<head>
<title>
Messages : View
</title>
<title>
Messages : View
</title>
</head>
</head>
<body>
<body>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<h1
layout:fragment=
"header"
>
Messages : Create
</h1>
<div
layout:fragment=
"content"
<div
layout:fragment=
"content"
class=
"container"
>
class=
"container"
>
<div
class=
"alert alert-success"
th:if=
"${globalMessage}"
<div
class=
"alert alert-success"
th:text=
"${globalMessage}"
>
Some Success message
</div>
th:if=
"${globalMessage}"
<div
class=
"pull-right"
>
th:text=
"${globalMessage}"
>
<a
th:href=
"@{/}"
href=
"list.html"
>
Messages
</a>
Some Success message
</div>
</div>
<dl>
<div
class=
"pull-right"
>
<dt>
ID
</dt>
<a
th:href=
"@{/}"
href=
"list.html"
>
<dd
id=
"id"
th:text=
"${message.id}"
>
123
</dd>
Messages
<dt>
Date
</dt>
</a>
<dd
id=
"created"
th:text=
"${#calendars.format(message.created)}"
>
</div>
July 11, 2012 2:17:16 PM CDT
</dd>
<dl>
<dt>
Summary
</dt>
<dt>
ID
</dt>
<dd
id=
"summary"
th:text=
"${message.summary}"
>
A short summary...
<dd
id=
"id"
th:text=
"${message.id}"
>
123
</dd>
</dd>
<dt>
Date
</dt>
<dt>
Message
</dt>
<dd
id=
"created"
<dd
id=
"text"
th:text=
"${message.text}"
>
A detailed message that
th:text=
"${#calendars.format(message.created)}"
>
is longer than the summary.
</dd>
July 11, 2012 2:17:16 PM CDT
</dl>
</dd>
<div
class=
"pull-left"
>
<dt>
Summary
</dt>
<a
href=
"messages"
th:href=
"@{'/delete/' + ${message.id}}"
>
<dd
id=
"summary"
delete
</a>
|
<a
href=
"form.html"
th:text=
"${message.summary}"
>
th:href=
"@{'/modify/' + ${message.id}}"
>
modify
</a>
A short summary...
</div>
</dd>
</div>
<dt>
Message
</dt>
</body>
<dd
id=
"text"
</html>
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>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment