aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/UserThread.java
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2012-10-16 13:06:36 +0700
committerGravatar Ugnich Anton2012-10-16 13:06:36 +0700
commit3732f229c6dc4d56dc85cb01b104b28ff419ed5c (patch)
treecf6b73c09b992004a7ad136f379b9522495785ab /src/java/com/juick/http/www/UserThread.java
parent98f036ae01fe90ad9d5853918602b705fdd41f02 (diff)
message recomended by...
Diffstat (limited to 'src/java/com/juick/http/www/UserThread.java')
-rw-r--r--src/java/com/juick/http/www/UserThread.java25
1 files changed, 18 insertions, 7 deletions
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index 1680ca8e..320c62ba 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -141,6 +141,11 @@ public class UserThread {
out.println("<ul>");
out.println(" <li id=\"msg-" + mid + "\" class=\"msg\" style=\"border: 0\">");
+ out.println(" <div class=\"msg-avatar\"><a href=\"/" + uname + "/\"><img src=\"http://i.juick.com/a/" + uid + ".png\" alt=\"" + uname + "\"/></a></div>");
+ out.println(" <div class=\"msg-ts\"><a href=\"/" + uname + "/" + mid + "\" title=\"" + rs.getString(9) + "\">" + PageTemplates.formatDate(rs.getInt(8), rs.getString(9), locale) + "</a></div>");
+ out.println(" <div class=\"msg-header\"><a href=\"/" + uname + "/\">@" + uname + "</a>:" + tags + "</div>");
+ out.println(" <div class=\"msg-txt\">" + txt + "</div>");
+
if (rs.getString(11) != null) {
if (rs.getString(11).equals("jpg")) {
out.println(" <div class=\"msg-media\"><a href=\"http://i.juick.com/p/" + mid + ".jpg\"><img src=\"http://i.juick.com/photos-512/" + mid + ".jpg\" alt=\"\"/></a></div>");
@@ -152,17 +157,23 @@ public class UserThread {
}
}
- out.println(" <div class=\"msg-avatar\"><a href=\"/" + uname + "/\"><img src=\"http://i.juick.com/a/" + uid + ".png\" alt=\"" + uname + "\"/></a></div>");
- out.println(" <div class=\"msg-ts\"><a href=\"/" + uname + "/" + mid + "\" title=\"" + rs.getString(9) + "\">" + PageTemplates.formatDate(rs.getInt(8), rs.getString(9), locale) + "</a></div>");
- out.println(" <div class=\"msg-header\"><a href=\"/" + uname + "/\">@" + uname + "</a>:" + tags + "</div>");
- out.println(" <div class=\"msg-txt\">" + txt + "</div>");
-
if (cancomment) {
out.println(" <form action=\"/post\" method=\"POST\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"mid\" value=\"" + mid + "\"/>");
- out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\"Add a comment...\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>");
+ out.println(" <div class=\"msg-comment\"><textarea name=\"body\" rows=\"1\" class=\"reply\" placeholder=\""+rb.getString("Add a comment")+"\" onkeypress=\"postformListener(this.form,event)\"></textarea></div>");
out.println(" </form>");
}
+ ArrayList<String> recomm = MessagesQueries.getMessageRecommendations(sql, mid);
+ if (!recomm.isEmpty()) {
+ out.print(" <div class=\"" + (cancomment ? "msg-recomms" : "msg-comments") + "\">" + rb.getString("Recommended by") + " (" + recomm.size() + "): ");
+ for (int i = 0; i < recomm.size(); i++) {
+ if (i > 0) {
+ out.print(", ");
+ }
+ out.print("<a href=\"/" + recomm.get(i) + "/\">@" + recomm.get(i) + "</a>");
+ }
+ }
+
out.println(" </li>");
out.println("</ul>");
}
@@ -230,7 +241,7 @@ public class UserThread {
out.print("<a href=\"#\" onclick=\"$('#replies>li').show(); $('#replies .msg-comments').hide(); return false\">" + rbuser.getString("Expand all") + "</a> &#183; <a href=\"?view=list\">" + rbuser.getString("View as list") + "</a>");
}
out.print("</div>");
- out.println(" <h2>Replies (" + replies.size() + ")</h2>");
+ out.println(" <h2>"+rbuser.getString("Replies")+" (" + replies.size() + ")</h2>");
out.println("</div>");
out.println("<ul id=\"replies\">");