diff options
author | Ugnich Anton | 2012-11-02 16:16:30 +0700 |
---|---|---|
committer | Ugnich Anton | 2012-11-02 16:16:30 +0700 |
commit | b895a6e7a29193754a97e33b6af8bd66f1006fc4 (patch) | |
tree | 8a1921555d2fc9c600ac275e048319637f0a1680 /src/java/com/juick/http/www/User.java | |
parent | 4cb2de9cc1c5bf387d5cf81ab12fd9b0e16d9fc4 (diff) |
Message, user toolbars
Diffstat (limited to 'src/java/com/juick/http/www/User.java')
-rw-r--r-- | src/java/com/juick/http/www/User.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java index 93656d0e..f1896837 100644 --- a/src/java/com/juick/http/www/User.java +++ b/src/java/com/juick/http/www/User.java @@ -106,7 +106,7 @@ public class User { out.println("<div id=\"content\">"); out.println("<ul>"); if (mids.size() > 0) { - PageTemplates.printMessages(out, sql, mids, locale); + PageTemplates.printMessages(out, sql, mids, visitor, locale); } out.println("</ul>"); @@ -266,8 +266,26 @@ public class User { ResourceBundle rb = ResourceBundle.getBundle("User", locale); out.println("<div id=\"column\" class=\"stickya\">"); - out.println(" <div id=\"ctitle\"><a href=\"./\"><img src=\"//i.juick.com/as/" + user.UID + ".png\"/>" + user.UName + "</a></div>"); - out.println(" <hr/>"); + out.println(" <div id=\"ctitle\"><a href=\"./\"><img src=\"//i.juick.com/as/" + user.UID + ".png\" alt=\"\"/>" + user.UName + "</a></div>"); + if (visitor != null && visitor.UID > 0 && visitor.UID != user.UID) { + out.println(" <ul id=\"ctoolbar\">"); + if (UserQueries.isSubscribed(sql, visitor.UID, user.UID)) { + out.println(" <li><a href=\"/post?body=U+%40" + user.UName + "\"><div style=\"background-position: -48px 0\"></div></a></li>"); + } else { + out.println(" <li><a href=\"/post?body=S+%40" + user.UName + "\"><div style=\"background-position: -16px 0\"></div></a></li>"); + } + if (UserQueries.isInBL(sql, visitor.UID, user.UID)) { + out.println(" <li><a href=\"/post?body=BL+%40" + user.UName + "\"><div style=\"background-position: -96px 0\"></div></a></li>"); + } else { + out.println(" <li><a href=\"/post?body=BL+%40" + user.UName + "\"><div style=\"background-position: -80px 0\"></div></a></li>"); + } + if (!UserQueries.isInBL(sql, user.UID, visitor.UID)) { + out.println(" <li><a href=\"/post?body=PM+%40" + user.UName + "\"><div style=\"background-position: -112px 0\"></div></a></li>"); + } + out.println(" </ul>"); + } else { + out.println(" <hr/>"); + } out.println(" <ul>"); out.println(" <li><a href=\"./\">" + rb.getString("(Menu) Blog") + "</a></li>"); out.println(" <li><a href=\"./?show=recomm\">" + rb.getString("(Menu) Recommendations") + "</a></li>"); |