aboutsummaryrefslogtreecommitdiff
path: root/juick-spring-www/src/main/java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-14 00:11:19 +0300
committerGravatar Vitaly Takmazov2016-12-14 17:27:54 +0300
commit2a597191ba108b5d9b3757aa002ce5c780ac60ad (patch)
treed28caa360ffb44a0a805e0eaa1878fcc4c533810 /juick-spring-www/src/main/java
parent91ee5d2578868125fcaf35d6fe08ef3604640cd6 (diff)
juick-spring-www: fix templates title
Diffstat (limited to 'juick-spring-www/src/main/java')
-rw-r--r--juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java b/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java
index bc524507..69688513 100644
--- a/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java
+++ b/juick-spring-www/src/main/java/com/juick/www/controllers/TagController.java
@@ -90,6 +90,9 @@ public class TagController {
model.addAttribute("msgs",
msgs.stream().map(msg -> {
msg.ReadOnly |= blUIDs.contains(msg.getUser().getUid());
+ if (msg.ReadOnly) {
+ msg.ReadOnly = visitor.getUid() != msg.getUser().getUid();
+ }
return msg;
}).collect(Collectors.toList())
);
@@ -97,7 +100,8 @@ public class TagController {
String nextpage = "/tag/" + URLEncoder.encode(paramTag.getName(), "UTF-8") + "?before=" + mids.get(mids.size() - 1);
model.addAttribute("nextpage", nextpage);
}
- return "blog/index";
+ model.addAttribute("tags", tagService.getPopularTags());
+ return "views/index";
}
@RequestMapping("/tag")