From dfaed35136ba1ed24cfb49acb87e837a11a2a8d1 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Wed, 23 Oct 2013 23:20:21 +0700 Subject: New feed design --- src/java/com/juick/http/www/PageTemplates.java | 15 ++++++++---- src/java/com/juick/http/www/UserThread.java | 32 ++++++++++++++++++-------- 2 files changed, 33 insertions(+), 14 deletions(-) (limited to 'src') diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index f83713c9..fc9bb1d5 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -50,7 +50,7 @@ public class PageTemplates { out.println(""); out.print(""); out.print(""); - out.print(""); + out.print(""); out.print(""); out.print(""); out.print(""); @@ -209,7 +209,7 @@ public class PageTemplates { if (user == null) { ret += "/tag/"; } else { - ret += "./?tag="; + ret += "/" + user.UName + "/?tag="; } ret += URLEncoder.encode(tags.get(i), "utf-8") + "\">" + tag + ""; } catch (UnsupportedEncodingException e) { @@ -400,7 +400,7 @@ public class PageTemplates { com.juick.Message msg = msgs.get(i); - String tags = msg.Tags.isEmpty() ? "" : formatTags(msg.Tags, user); + String tags = msg.Tags.isEmpty() ? "" : formatTags(msg.Tags, msg.User); if (msg.ReadOnly) { tags += " *readonly"; } @@ -426,10 +426,16 @@ public class PageTemplates { txt = formatMessage(msg.Text); } + if (!tags.isEmpty()) { + tags = "" + tags + ""; + } + out.println("
  • "); out.println("
    \""
    "); + out.println("
    "); + out.println("
    "); out.println(" "); - out.println(" "); + out.println(" "); if (msg.Place != null) { out.println(" "); } @@ -453,6 +459,7 @@ public class PageTemplates { out.println("
    "); out.println(" "); } + out.println("
    "); out.println("
  • "); } } diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java index 6fb63209..0d096aa1 100644 --- a/src/java/com/juick/http/www/UserThread.java +++ b/src/java/com/juick/http/www/UserThread.java @@ -95,7 +95,7 @@ public class UserThread { msg.VisitorCanComment = visitor != null; - String tags = (msg.Tags.isEmpty()) ? "" : PageTemplates.formatTags(msg.Tags, user); + String tags = (msg.Tags.isEmpty()) ? "" : PageTemplates.formatTags(msg.Tags, msg.User); if (msg.ReadOnly) { tags += " *readonly"; msg.VisitorCanComment = false; @@ -122,9 +122,14 @@ public class UserThread { txt = PageTemplates.formatMessage(msg.Text); } + if (!tags.isEmpty()) { + tags = "" + tags + ""; + } + out.println("