aboutsummaryrefslogtreecommitdiff
path: root/juick-server
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server')
-rw-r--r--juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java18
-rw-r--r--juick-server/src/main/resources/templates/views/partial/navigation.html2
2 files changed, 7 insertions, 13 deletions
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
index 06721912..53503cb5 100644
--- a/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
+++ b/juick-server/src/main/java/com/juick/server/www/controllers/MessagesWWW.java
@@ -111,17 +111,12 @@ public class MessagesWWW {
title = "Поиск: " + StringEscapeUtils.escapeHtml4(paramSearch);
mids = messagesService.getSearch(Utils.encodeSphinx(paramSearch), page);
} else if (paramShow == null) {
- if (!visitor.isAnonymous()) {
- title = "Популярные";
- mids = messagesService.getPopular(visitor.getUid(), paramBefore);
- model.addAttribute("discover", true);
- } else {
- title = "Микроблоги Juick: популярные записи";
- mids = messagesService.getPopular(0, paramBefore);
- }
-
+ title = "Обсуждения";
+ mids = messagesService.getDiscussions(visitor.getUid(), paramTo);
} else if (paramShow.equals("top")) {
- return "redirect:/";
+ title = "Популярные";
+ mids = messagesService.getPopular(visitor.getUid(), paramBefore);
+ model.addAttribute("discover", true);
} else if (paramShow.equals("my") && !visitor.isAnonymous()) {
title = "Моя лента";
mids = messagesService.getMyFeed(visitor.getUid(), paramBefore, true);
@@ -129,8 +124,7 @@ public class MessagesWWW {
title = "Приватные";
mids = messagesService.getPrivate(visitor.getUid(), paramBefore);
} else if (paramShow.equals("discuss")) {
- title = "Обсуждения";
- mids = messagesService.getDiscussions(visitor.getUid(), paramTo);
+ return "redirect:/";
} else if (paramShow.equals("recommended") && !visitor.isAnonymous()) {
title = "Рекомендации";
mids = messagesService.getRecommended(visitor.getUid(), paramBefore);
diff --git a/juick-server/src/main/resources/templates/views/partial/navigation.html b/juick-server/src/main/resources/templates/views/partial/navigation.html
index 7119f1c0..03b6c56d 100644
--- a/juick-server/src/main/resources/templates/views/partial/navigation.html
+++ b/juick-server/src/main/resources/templates/views/partial/navigation.html
@@ -17,7 +17,7 @@
</div>
<nav id="global">
<ul>
- <li><a href="/?show=discuss"><i data-icon="ei-comment" data-size="s"></i>{{ i18n("messages","link.discuss") }}{% if visitor.unreadCount > 0 %}<span class="badge">{{ visitor.unreadCount }}</span>{% endif %}</a></li>
+ <li><a href="/"><i data-icon="ei-comment" data-size="s"></i>{{ i18n("messages","link.discuss") }}{% if visitor.unreadCount > 0 %}<span class="badge">{{ visitor.unreadCount }}</span>{% endif %}</a></li>
<li><a href="/?show=all" rel="nofollow"><i data-icon="ei-search" data-size="s"></i>{{ i18n("messages","link.allMessages") }}</a></li>
{% if visitor.uid > 0 %}
<li><a id="post" href="/post">