diff options
author | Alexander Alexeev | 2016-12-11 13:56:26 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-11 18:24:38 +0300 |
commit | f2454d531e9e99c406a513d92702858510fef4b9 (patch) | |
tree | 19090e8f207e875615bec60d3aa65ac6e4e34e12 /juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html | |
parent | f9d9f6ac709b0dfe1c1e3f711b2fee6a93f33d42 (diff) |
i18n, using SecurityContextHolder for get currentUser (user always not null)
Diffstat (limited to 'juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html')
-rw-r--r-- | juick-spring-www/src/main/webapp/WEB-INF/templates/views/partial/navigation.html | 31 |
1 files changed, 15 insertions, 16 deletions
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/views/partial/navigation.html index 79b41211..51489194 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/views/partial/navigation.html @@ -3,40 +3,39 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"> <body layout:fragment="nav"> - <div id="logo"><a href="/">Juick</a></div> + <div id="logo"><a href="/" th:href="@{/}">Juick</a></div> <nav id="global"> <ul> - <li><a href="/" th:href="@{/}">Популярные</a></li> - <li><a href="/?show=all" th:href="@{/?show=all}" rel="nofollow">Все сообщения</a></li> - <li><a href="/?show=photos" th:href="@{/?show=photos}" rel="nofollow">Фотографии</a></li> + <li><a href="/" th:href="@{/}" th:text="#{link.popular}">Популярные</a></li> + <li><a href="/?show=all" th:href="@{/?show=all}" rel="nofollow" th:text="#{link.allMessages}">Все сообщения</a></li> + <li><a href="/?show=photos" th:href="@{/?show=photos}" rel="nofollow" th:text="#{link.withPhotos}">Фотографии</a></li> </ul> </nav> <div id="search"> <form action="/"> - <input type="text" name="search" class="text" placeholder="Поиск" th:value="${param.search}"/> + <input type="text" name="search" class="text" placeholder="Поиск" th:placeholder="#{label.search}" th:value="${param.search}"/> </form> </div> - <section id="headdiv" th:switch="${visitor.getUid() > 0}"> - <th:block th:case="true"> + <section id="headdiv" th:switch="${visitor.isAnonym()}"> + <th:block th:case="false"> <nav id="user"> <ul> - <li><a href="/?show=my" th:href="@{/?show=my}">Моя лента</a></li> - <li><a href="/pm/inbox" th:href="@{/pm/inbox}">Приватные</a></li> - <li><a href="/?show=discuss" th:href="@{/?show=discuss}">Обсуждения</a></li> - <li><a href="/?show=recommended" th:href="@{/?show=recommended}">Рекомендации</a></li> + <li><a href="/?show=my" th:href="@{/?show=my}" th:text="#{link.my}">Моя лента</a></li> + <li><a href="/pm/inbox" th:href="@{/pm/inbox}" th:text="#{link.privateMessages}">Приватные</a></li> + <li><a href="/?show=discuss" th:href="@{/?show=discuss}" th:text="#{link.discuss}">Обсуждения</a></li> + <li><a href="/?show=recommended" th:href="@{/?show=recommended}" th:text="#{link.recommended}">Рекомендации</a></li> </ul> </nav> <nav id="actions"> <ul> - <li><a href="/#post" th:href="@{/#post}">Написать</a></li> + <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="/logout" th:href="@{/logout}">Выйти</a></li> + <li><a href="/logout" th:href="@{/logout}" th:text="#{link.logout}">Выйти</a></li> </ul> </nav> </th:block> - <th:block th:case="false"> - <p>Чтобы добавлять сообщения и комментарии, <a href="/login" th:href="@{/login}">представьтесь</a>. - </p> + <th:block th:case="true"> + <p>[(#{message.loginForSending(@{/login})})]</p> </th:block> </section> </body> |