Browse Source

Update error HTML template

Signed-off-by: Pekka Helenius <fincer89@hotmail.com>
v0.0.1-alpha
Pekka Helenius 4 years ago
parent
commit
535e814039
2 changed files with 23 additions and 4 deletions
  1. +4
    -0
      bookstore/src/main/resources/messages.properties
  2. +19
    -4
      bookstore/src/main/resources/templates/error.html

+ 4
- 0
bookstore/src/main/resources/messages.properties View File

@ -36,15 +36,19 @@ book.error.price = Invalid price
page.title.browser.list = Bookstore page
page.title.browser.add = Add book
page.title.browser.edit = Update book
page.title.browser.error = Error page
page.title.webform.list = Books
page.title.webform.add = Add new book
page.title.webform.edit = Update existing book
page.title.webform.error = Error
page.text.list.actions = Actions
page.text.list.delete = Delete
page.text.list.edit = Edit
page.text.error = Error while processing your request
button.book.add = Add book
button.book.edit = Update book


+ 19
- 4
bookstore/src/main/resources/templates/error.html View File

@ -1,10 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Error page</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link type="text/css" rel="stylesheet" href="../static/css/bookstore.css" th:href="@{../css/bookstore.css}" />
<link type="text/css" rel="stylesheet" href="../static/css/bootstrap.min.css" th:href="@{../css/bootstrap.min.css}" />
<title th:text="${#messages.msgOrNull('page.title.browser.error')} ?: 'page.title.browser.error'">
page.title.browser.error
</title>
</head>
<body>
Error while processing your request.
<div class="col-md-4 mb-3">
<h1 th:text="${#messages.msgOrNull('page.title.webform.error')} ?: 'page.title.webform.error'">
page.title.webform.error
</h1>
<div class="alert alert-danger mt-2"
th:text="${#messages.msgOrNull('page.text.error')} ?: 'page.text.error'">
page.text.error
</div>
</div>
</body>
</html>

Loading…
Cancel
Save