diff options
author | Vitaly Takmazov | 2016-08-30 14:38:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-08-30 14:38:28 +0300 |
commit | e6962670c778966b49620d6166581986fa54cf34 (patch) | |
tree | ec7518d34bc8910ad915ffad8da09266e9452b39 /juick-www/src/main/java/com | |
parent | 3e4ed1552076018f88cc2bb47cb99b7eec607286 (diff) |
fix templates
Diffstat (limited to 'juick-www/src/main/java/com')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/PM.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/PM.java b/juick-www/src/main/java/com/juick/www/PM.java index e64a3606..f912f0b6 100644 --- a/juick-www/src/main/java/com/juick/www/PM.java +++ b/juick-www/src/main/java/com/juick/www/PM.java @@ -39,6 +39,8 @@ import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; +import static com.juick.www.PageTemplates.sape; + /** * * @author Ugnich Anton @@ -51,7 +53,7 @@ public class PM { String title = "PM: Inbox"; List<com.juick.Message> msgs = PMQueries.getLastPMInbox(sql, visitor.getUID()); msgs.forEach(m -> m.setText(Utils.formatMessage(m.getText()))); - + String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render(); response.setContentType("text/html; charset=UTF-8"); try (PrintWriter out = response.getWriter()) { PebbleTemplate template = Utils.getEngine().getTemplate("views/pm_inbox.html"); @@ -60,6 +62,10 @@ public class PM { context.put("visitor", visitor); context.put("msgs", msgs); context.put("tags", TagQueries.getPopularTags(sql)); + if (visitor.getUID() == 0) { + context.put("showAdv", true); + context.put("links", links); + } template.evaluate(out, context); } } |