diff options
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-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); } } |