aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/webapp
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-12-12 16:58:18 +0700
committerGravatar Vitaly Takmazov2016-12-12 22:49:47 +0300
commitd446ba75acc05ec331540d51348bdc2be5aecb42 (patch)
tree445814fcf456999e9955c3570c381bdced015eab /juick-spring-www/src/main/webapp
parent02979491ee071371bdbcc1e6ed813ffd44b5834b (diff)
rtemplate refactoring: layout templates moved to layout directory;
show error message on login error
Diffstat (limited to 'juick-spring-www/src/main/webapp')
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/index.html17
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html (renamed from juick-spring-www/src/main/webapp/WEB-INF/templates/views/login.html)1
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html2
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/footer.html (renamed from juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html)5
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html (renamed from juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html)4
-rw-r--r--juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/homecolumn.html9
6 files changed, 31 insertions, 7 deletions
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html
new file mode 100644
index 00000000..4cd32be3
--- /dev/null
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org"
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
+ layout:decorate="~{layout/mainLayout}">
+<head>
+ <title>Главная страница</title>
+</head>
+
+<body>
+<section layout:fragment="content">
+ <p>Главная страница !</p>
+</section>
+<aside id="column">
+ <p layout:fragment="column"></p>
+</aside>
+</body>
+</html> \ No newline at end of file
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/login.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html
index d2e424cd..9fd43192 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/login.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/login.html
@@ -133,6 +133,7 @@
<div id="signin">
<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/layout/mainLayout.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html
index e851aefa..ef9887d2 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/mainLayout.html
@@ -25,6 +25,6 @@
<p layout:fragment="column">Side column</p>
</aside>
-<footer layout:replace="~{views/partial/footer :: footer}">Footer</footer>
+<footer layout:replace="~{layout/partial/footer :: footer}">Footer</footer>
</body>
</html> \ No newline at end of file
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/footer.html
index da911619..0e4e8540 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/footer.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/footer.html
@@ -5,10 +5,9 @@
<body layout:fragment="footer">
<div id="footer">
<div id="footer-right">
- <a href="/settings" th:href="@{/settings}" th:text="#{link.settings}" rel="nofollow">Настройки</a> &#183;
- <a href="/help/ru/contacts" th:href="@{/help/ru/contacts}" th:text="#{link.contacts}" rel="nofollow">Контакты</a> &#183;
+ <a href="/help/ru/contacts" th:href="@{/help/contacts}" th:text="#{link.contacts}" rel="nofollow">Контакты</a> &#183;
<a href="/help/" th:href="@{/help/}" th:text="#{link.help}" rel="nofollow">Справка</a> &#183;
- <a href="/help/ru/adv" th:href="@{/help/ru/adv}" th:text="#{link.adv}" rel="nofollow">Реклама</a>
+ <a href="/help/ru/adv" th:href="@{/help/adv}" th:text="#{link.adv}" rel="nofollow">Реклама</a>
</div>
<div id="footer-social">
<a href="https://twitter.com/Juick" rel="nofollow" class="ico32-twi">Twitter</a>
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
index 77c9321a..95714e10 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/layout/partial/navigation.html
@@ -35,8 +35,8 @@
<nav id="actions">
<ul>
<li><a href="/#post" th:href="@{/#post}" th:text="#{link.postMessage}">Написать</a></li>
- <li><a href="/ugnich" th:href="@{/{userName}(userName=${visitor.name})}"
- th:text="'@'+${visitor.name}">@ugnich</a></li>
+ <li><a href="/ugnich" th:href="@{/{userName}(userName=${visitor.name})}" th:text="'@'+${visitor.name}">@ugnich</a></li>
+ <li><a href="/settings" th:href="@{/settings}" th:text="#{link.settings}" rel="nofollow">Настройки</a></li>
<li><a href="/logout" th:href="@{/logout}" th:text="#{link.logout}">Выйти</a></li>
</ul>
</nav>
diff --git a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/homecolumn.html b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/homecolumn.html
index 534e0368..2f0d707c 100644
--- a/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/homecolumn.html
+++ b/juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/homecolumn.html
@@ -1,4 +1,11 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org"
+ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">
+
+<body>
<p class="tags">
<div th:replace="views/partial/tags">Tags</div>
<a href="http://ru.wix.com/" th:if="${showAdv}">конструктор сайтов</a>
-</p> \ No newline at end of file
+</p>
+</body>
+</html>