From 76fda881197956afa4bac278a9d1e71effae6108 Mon Sep 17 00:00:00 2001 From: Igor Ustyugov Date: Sat, 27 Aug 2016 17:50:50 +0500 Subject: Avatars inside posts --- .../src/main/java/com/juick/www/PageTemplates.java | 18 ++++++---- .../src/main/java/com/juick/www/UserThread.java | 41 ++++++++++------------ 2 files changed, 29 insertions(+), 30 deletions(-) (limited to 'juick-www/src/main/java/com') diff --git a/juick-www/src/main/java/com/juick/www/PageTemplates.java b/juick-www/src/main/java/com/juick/www/PageTemplates.java index be9a024c..69b37e9b 100644 --- a/juick-www/src/main/java/com/juick/www/PageTemplates.java +++ b/juick-www/src/main/java/com/juick/www/PageTemplates.java @@ -59,7 +59,7 @@ public class PageTemplates { out.print(""); out.print(""); out.println(""); - out.print(""); + out.print(""); out.print(""); if (headers != null) { out.print(headers); @@ -190,7 +190,7 @@ public class PageTemplates { for (Tag tag : tags) { String tagName = tag.getName().replaceAll("<", "<").replaceAll(">", ">"); try { - ret += " * tags = MessagesQueries.getMessageTags(sql, msg.getMID()); String tagsStr = formatTags(tags); if (msg.ReadOnly) { - tagsStr += " *readonly"; + tagsStr += "readonly"; } if (msg.Privacy < 0) { - tagsStr += " *friends"; + tagsStr += "friends"; } if (msg.getMID() == ad_mid) { - tagsStr += " *реклама"; + tagsStr += "реклама"; } String txt; @@ -435,8 +435,12 @@ public class PageTemplates { out.println("
"); out.println(" "); - out.println("
@" + msg.getUser().getUName() + ":" + tagsStr + "
"); - out.println("
"); + out.println("
"); + out.println("
"); + out.println(" @" + msg.getUser().getUName() + ":"); + out.println("
" + tagsStr + "
"); + out.println("
"); + if (msg.AttachmentType != null) { String fname = msg.getMID() + "." + msg.AttachmentType; out.println("

\"\"/

"); diff --git a/juick-www/src/main/java/com/juick/www/UserThread.java b/juick-www/src/main/java/com/juick/www/UserThread.java index a048d795..c201fca3 100644 --- a/juick-www/src/main/java/com/juick/www/UserThread.java +++ b/juick-www/src/main/java/com/juick/www/UserThread.java @@ -97,11 +97,11 @@ public class UserThread { List tags = MessagesQueries.getMessageTags(sql, msg.getMID()); String tagsStr = PageTemplates.formatTags(tags); if (msg.ReadOnly) { - tagsStr += " *readonly"; + tagsStr += "readonly"; msg.VisitorCanComment = false; } if (msg.Privacy < 0) { - tagsStr += " *friends"; + tagsStr += "friends"; } String txt; @@ -112,17 +112,17 @@ public class UserThread { } if (!tags.isEmpty()) { - tagsStr = "" + tagsStr + ""; + tagsStr = "
" + tagsStr + "
"; } out.println("