aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java4
-rw-r--r--src/java/com/juick/http/www/UserThread.java25
2 files changed, 20 insertions, 9 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 08e88342..69fbb5ce 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -407,7 +407,7 @@ public class PageTemplates {
out.println(" <div class=\"msg-comments\"><a href=\"/" + uname + "/" + mid + "\">" + formatReplies(rs.getInt(10), locale) + "</a> " + rb.getString("(replies) by") + " " + repliesby + "</div>");
} else 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>");
}
out.println(" </li>");
@@ -417,7 +417,7 @@ public class PageTemplates {
} finally {
Utils.finishSQL(rs, stmt);
}
- }
+ }
/*
public static void printPhotos(PrintWriter out, Connection sql, ArrayList<Integer> mids, Locale locale) {
ResourceBundle rb = ResourceBundle.getBundle("Global", locale);
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\">");