diff options
author | Alexander Alexeev | 2016-12-12 20:58:56 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-12 22:49:47 +0300 |
commit | e0312a3359d7d2e7fe3d7771ad8d896133a2e2fc (patch) | |
tree | 3bd05fda12e67139cc51b13ca39bb9d94c81bf65 /juick-spring-www/src/main/webapp/WEB-INF | |
parent | 415b0ec7da02c07aad8fe85cfe0610ba9f4e5bd4 (diff) |
error page
Diffstat (limited to 'juick-spring-www/src/main/webapp/WEB-INF')
4 files changed, 26 insertions, 46 deletions
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/error.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/error.html new file mode 100644 index 00000000..60df54a7 --- /dev/null +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/error.html @@ -0,0 +1,25 @@ +<!DOCTYPE html> +<html xmlns:th="http://www.thymeleaf.org"> +<head> + <meta charset="UTF-8" /> + <meta http-equiv="X-UA-Compatible" content="IE=edge"> + <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"/> + + <link rel="stylesheet" href="/style.css" th:href="@{/style.css}"/> + + <script type="text/javascript" src="/scripts.js" th:href="@{/scripts.js}"></script> + + <link rel="icon" href="//i.juick.com/favicon.png"/> + <!--[if lt IE 9 & (!IEMobile 7)]> + <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script> + <![endif]--> + + <title th:text="#{error.title}">Error page</title> +</head> + +<body th:with="httpStatus=${T(org.springframework.http.HttpStatus).valueOf(#response.status)}"> + <h1 th:text="|${httpStatus} - ${httpStatus.reasonPhrase}|">404</h1> + <p th:utext="${errorMessage}">Error java.lang.NullPointerException</p> + <a href="/" th:href="@{/}" th:text="#{link.returnToMain}">Back to Home Page</a> +</body> +</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html index 9fd43192..bcfa318d 100644 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html +++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html @@ -131,9 +131,9 @@ </div> </div> <div id="signin"> + <p th:if="${loginError}" class="error" th:text="#{error.login}">Произошла ошибка, проверьте имя пользователя и пароль</p> <a href="#" onclick="$('#signinform').toggle(); $('#nickinput').focus(); return false" th:text="#{question.areRegistered}">Уже зарегистрированы?</a> <div id="signinform"> - <p th:if="${loginError}" class="error" th:text="#{error.login}">Произошла ошибка, проверьте имя пользователя и пароль</p> <form action="#" th:action="@{/do_login}" method="POST"> <input class="txt" type="text" name="j_username" placeholder="Имя пользователя" th:placeholder="#{label.username}" id="nickinput"/> <input class="txt" type="password" name="j_password" placeholder="Пароль" th:placeholder="#{label.password}"/> diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html deleted file mode 100644 index 4162aa8b..00000000 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/postNotFound.html +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org" - xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" - layout:decorate="~{layout/mainLayout}"> -<head> - <title th:text="#{error.pageNotFound}">Страница не найдена</title> -</head> -<body> - -<section layout:fragment="content"> - <div id="pagetitle"> - <h1 th:text="#{error.pageNotFound}">Страница не найдена</h1> - </div> - - <div id="wrapper"> - <p th:text="#{errors.pageNotFound.extended(${messageId})}">Похоже, пользователь удалил страницу, возможна она и не была создана.</p> - </div> - <div> - <a th:href="@{/}" href="/"><span th:text="#{link.returnToMain}">Вернуться на главную</span></a> - </div> -</section> -</body> -</html>
\ No newline at end of file diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html deleted file mode 100644 index de1a97a0..00000000 --- a/juick-spring-www/src/main/webapp/WEB-INF/templates/userNotFound.html +++ /dev/null @@ -1,22 +0,0 @@ -<!DOCTYPE html> -<html xmlns:th="http://www.thymeleaf.org" - xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" - layout:decorate="~{layout/mainLayout}"> -<head> - <title th:text="#{error.userNotFound}">Пользователь не найден</title> -</head> -<body> -<section layout:fragment="content"> - <div id="pagetitle"> - <h1 th:text="#{error.userNotFound}">Пользователь не найден</h1> - </div> - - <div id="wrapper"> - <p th:text="#{errors.userNotFound.extended(${userName})}">Пользователь не найден.</p> - </div> - <div> - <a th:href="@{/}" href="/"><span th:text="#{link.returnToMain}">Вернуться на главную</span></a> - </div> -</section> -</body> -</html>
\ No newline at end of file |