From 52f88dbb3c2e81e1b658b95ff91236db1a1fe03a Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Sun, 16 Dec 2012 12:01:39 +0700
Subject: message number dialog
---
src/java/Global.properties | 3 +++
src/java/Global_ru.properties | 3 +++
src/java/com/juick/http/www/Blogs.java | 1 +
src/java/com/juick/http/www/PageTemplates.java | 28 ++++++++++++++++++++++----
src/java/com/juick/http/www/User.java | 4 ++++
src/java/com/juick/http/www/UserThread.java | 10 ++++++---
6 files changed, 42 insertions(+), 7 deletions(-)
(limited to 'src/java')
diff --git a/src/java/Global.properties b/src/java/Global.properties
index 164b57a2..706e258f 100644
--- a/src/java/Global.properties
+++ b/src/java/Global.properties
@@ -24,3 +24,6 @@ Block\ user=Block user
Send\ private\ message=Send private message
Recommend\ message=Recommend message
in\ reply\ to=in reply to
+(Dialog)\ Link\ to\ message=Permanent link to this message
+(Dialog)\ Message\ number=Message number
+(Dialog)\ Share=Share in social networks
diff --git a/src/java/Global_ru.properties b/src/java/Global_ru.properties
index b98693da..a7c7e9d5 100644
--- a/src/java/Global_ru.properties
+++ b/src/java/Global_ru.properties
@@ -24,3 +24,6 @@ Block\ user=\u0417\u0430\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u0430\u
Send\ private\ message=\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
Recommend\ message=\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
in\ reply\ to=\u0432 \u043e\u0442\u0432\u0435\u0442 \u043d\u0430
+(Dialog)\ Link\ to\ message=\u041f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u0442\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435
+(Dialog)\ Message\ number=\u041d\u043e\u043c\u0435\u0440 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f
+(Dialog)\ Share=\u041f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u043e\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0435\u0442\u044f\u0445
diff --git a/src/java/com/juick/http/www/Blogs.java b/src/java/com/juick/http/www/Blogs.java
index 1bb308c5..3260a2cb 100644
--- a/src/java/com/juick/http/www/Blogs.java
+++ b/src/java/com/juick/http/www/Blogs.java
@@ -189,6 +189,7 @@ public class Blogs {
out.println(""); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 2ec42e42..10b372a0 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -55,11 +55,11 @@ public class PageTemplates {
out.println("");
out.println("
");
out.println(" " + title + "");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" ");
out.println(" ");
- out.println(" ");
+ out.println(" ");
if (headers != null) {
out.println(headers);
}
@@ -146,6 +146,23 @@ public class PageTemplates {
out.println();
}
+ public static void pageDialogTemplate(PrintWriter out, Locale locale) {
+ ResourceBundle rb = ResourceBundle.getBundle("Global", locale);
+ out.println("");
+ out.println("" + rb.getString("(Dialog) Link to message") + ":");
+ out.println("
");
+ out.println(rb.getString("(Dialog) Message number") + ":");
+ out.println("
");
+ out.println(rb.getString("(Dialog) Share") + ":");
+ out.println("
");
+ out.println(" ");
+ out.println(" ");
+ out.println(" ");
+ out.println(" ");
+ out.println("
");
+ out.println("
");
+ }
+
public static void pageFooter(HttpServletRequest request, PrintWriter out, Locale loc, com.juick.User visitor) {
ResourceBundle rb = ResourceBundle.getBundle("Global", loc);
out.println("");
out.println("
"); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -156,6 +157,7 @@ public class User {
out.println("");
out.println("");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -206,6 +208,7 @@ public class User {
out.println("");
out.println("");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -256,6 +259,7 @@ public class User {
out.println("");
out.println("");
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
diff --git a/src/java/com/juick/http/www/UserThread.java b/src/java/com/juick/http/www/UserThread.java
index a0bb3a86..5beb6b61 100644
--- a/src/java/com/juick/http/www/UserThread.java
+++ b/src/java/com/juick/http/www/UserThread.java
@@ -79,6 +79,7 @@ public class UserThread {
out.println("");
out.println(""); // topwrapper
+ PageTemplates.pageDialogTemplate(out, locale);
PageTemplates.pageFooter(request, out, locale, visitor);
} finally {
out.close();
@@ -106,6 +107,9 @@ public class UserThread {
tags += " *friends";
break;
case -2:
+ tags += " *friends";
+ break;
+ case -3:
tags += " *private";
break;
}
@@ -113,7 +117,7 @@ public class UserThread {
out.println("");
out.println(" - ");
out.println(" ");
- out.println("
" + PageTemplates.formatJSLocalTime(msg.TimestampString) + "
");
+ out.println(" " + PageTemplates.formatJSLocalTime(msg.TimestampString) + "
");
out.println(" ");
if (msg.Place != null && msg.Place.pid > 0) {
out.println(" " + msg.Place.name + "
");
@@ -292,7 +296,7 @@ public class UserThread {
}
}
out.println(" ");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" " + PageTemplates.formatMessage(msg.Text) + "
");
if (msg.VisitorCanComment) {
@@ -331,7 +335,7 @@ public class UserThread {
}
}
out.println(" ");
- out.println(" ");
+ out.println(" ");
out.println(" ");
out.println(" " + PageTemplates.formatMessage(msg.Text) + "
");
out.print(" /" + msg.RID);
--
cgit v1.2.3