diff options
author | Alexander Alexeev | 2016-12-12 22:41:10 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-12-12 22:49:47 +0300 |
commit | c0831038bd7bde32df5af8fb851d210daeccc853 (patch) | |
tree | 7a29aec0a4620e5d6b3cfd733f2219f09da6e5f6 /juick-spring-www/src/main/java | |
parent | 353bfb2556ab2288126e448668839cf8b8434fc1 (diff) |
i18n for pages
Diffstat (limited to 'juick-spring-www/src/main/java')
4 files changed, 7 insertions, 15 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java index 7821a916..4576e9d3 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/IndexController.java @@ -55,12 +55,7 @@ public class IndexController { User visitor = UserUtils.getCurrentUser(); - String title; - if (!visitor.isAnonym()) { - title = "Популярные"; - } else { - title = "Микроблоги Juick: популярные записи"; - } + String title = ""; int before = paramBefore.orElse(0); @@ -95,7 +90,6 @@ public class IndexController { } model.addAttribute("title", title); model.addAttribute("tags", tagService.getPopularTags()); - model.addAttribute("showAdv", true); List<Message> msgs = messagesService.getMessages(mids); List<Integer> blUIDs = userService.checkBL(visitor.getUid(), msgs.stream().map(m -> m.getUser().getUid()).collect(Collectors.toList())); @@ -121,12 +115,12 @@ public class IndexController { @RequestMapping(value = "/login", method = RequestMethod.GET) public String getLoginForm() { - return "layout/login"; + return "views/login"; } @RequestMapping(value = "/login-error", method = RequestMethod.GET) public String getLoginErrorForm(Model model) { model.addAttribute("loginError", true); - return "layout/login"; + return "views/login"; } }
\ No newline at end of file diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java index fc5937dd..3228b4c0 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/PMController.java @@ -67,7 +67,6 @@ public class PMController { uname = ""; } context.put("title", title); - context.put("visitor", visitor); context.put("msgs", msgs); context.put("tags", tagService.getPopularTags()); context.put("uname", uname); diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java index e7319fb9..65309e4e 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/SettingsController.java @@ -269,7 +269,6 @@ public class SettingsController { throw new HttpBadRequestException(); } context.put("title", "Настройки"); - context.put("visitor", visitor); context.put("result", result); return "views/settings_result"; } diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/ShowMessageController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/ShowMessageController.java index df204c5f..62e7293b 100644 --- a/juick-spring-www/src/main/java/com/juick/www/controllers/ShowMessageController.java +++ b/juick-spring-www/src/main/java/com/juick/www/controllers/ShowMessageController.java @@ -92,7 +92,7 @@ public class ShowMessageController { throw new HttpNotFoundException(); } - return "index"; + return "views/index"; } @RequestMapping("/{userName}/friends") @@ -111,7 +111,7 @@ public class ShowMessageController { throw new HttpNotFoundException(); } - return "index"; + return "views/index"; } @RequestMapping("/{userName}/readers") @@ -130,7 +130,7 @@ public class ShowMessageController { throw new HttpNotFoundException(); } - return "index"; + return "views/index"; } @RequestMapping("/{userName}/tags") @@ -149,7 +149,7 @@ public class ShowMessageController { throw new HttpNotFoundException(); } - return "index"; + return "views/index"; } @RequestMapping("/{userName}/{postNumber}") |