aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http
diff options
context:
space:
mode:
authorGravatar Ugnich Anton2014-07-09 14:57:58 +0700
committerGravatar Ugnich Anton2014-07-09 14:57:58 +0700
commit7c9a7590f30873df16941057c59abdb4b8672836 (patch)
tree5e379532b670959ad3591015b741919ba60ee460 /src/java/com/juick/http
parent72b0f51fb006c8719219a58c3cab746cf766d2f7 (diff)
Change message privacy
Diffstat (limited to 'src/java/com/juick/http')
-rw-r--r--src/java/com/juick/http/www/PageTemplates.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index cefd3cdd..dabbea99 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -53,7 +53,7 @@ public class PageTemplates {
out.print("<head>");
out.print("<link rel=\"stylesheet\" href=\"/style.2014070300.css\"/>");
out.print("<script type=\"text/javascript\" src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\"></script>");
- out.print("<script type=\"text/javascript\" src=\"/scripts.2014062900.js\"></script>");
+ out.print("<script type=\"text/javascript\" src=\"/scripts.2014070500.js\"></script>");
if (headers != null) {
out.print(headers);
}
@@ -219,12 +219,19 @@ public class PageTemplates {
out.print("<a href=\"https://www.facebook.com/JuickCom\" rel=\"nofollow\" class=\"ico32-fb\">Facebook</a>");
out.println("</div>");
out.print(" <div id=\"footer-left\">juick.com &copy; 2008-2014");
- if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && request.getQueryString() == null) {
- String links = sape.getPageLinks(request.getRequestURI(), request.getCookies()).render();
+
+ String queryString = request.getQueryString();
+ String requestURI = request.getRequestURI();
+ if (sapeon && sape != null && (visitor == null || visitor.UID == 1) && queryString == null) {
+ String links = sape.getPageLinks(requestURI, request.getCookies()).render();
if (links != null && !links.isEmpty()) {
out.print("<br/>Спонсоры: " + links);
}
}
+ if ((visitor == null || visitor.UID == 1) && queryString != null && requestURI != null && requestURI.equals("/")) {
+ out.print("<br/><a href=\"http://siam.li/\">сиам</a>");
+ }
+
out.println("</div>");
out.println("</div>");
@@ -529,6 +536,9 @@ public class PageTemplates {
out.print("<a href=\"#\" onclick=\"return showCommentFooter(this)\">Комментировать</a> ");
}
out.print("<a href=\"#\" onclick=\"return likeMessage(this," + msg.MID + ")\">Мне нравится</a>");
+ if (visitor != null && msg.Privacy < 0 && msg.User.UID == visitor.UID) {
+ out.print(" <a href=\"#\" onclick=\"return setPrivacy(this," + msg.MID + ")\">Открыть доступ</a>");
+ }
if (visitor != null && visitor.UID == 1) {
out.print(" <a href=\"#\" onclick=\"return setPopular(this," + msg.MID + ",2)\">+</a>");
out.print(" <a href=\"#\" onclick=\"return setPopular(this," + msg.MID + ",-1)\">-</a>");