From 48b7aa72126b1a75e470077de48408d24fb1b546 Mon Sep 17 00:00:00 2001
From: Ugnich Anton
Date: Sat, 15 Feb 2014 13:13:04 +0700
Subject: New message layout (article); Google Analytics; small bugfixes
---
src/java/com/juick/http/www/PageTemplates.java | 157 ++++++++++---------------
1 file changed, 61 insertions(+), 96 deletions(-)
(limited to 'src/java/com/juick/http/www/PageTemplates.java')
diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java
index 32e77239..228cff91 100644
--- a/src/java/com/juick/http/www/PageTemplates.java
+++ b/src/java/com/juick/http/www/PageTemplates.java
@@ -46,16 +46,15 @@ public class PageTemplates {
private static final SimpleDateFormat sdfSQL = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
private static SimpleDateFormat sdfSimple = new SimpleDateFormat("d MMM");
private static SimpleDateFormat sdfFull = new SimpleDateFormat("d MMM yyyy");
- private static SimpleDateFormat sdfJS = new SimpleDateFormat("yyyy,MM,dd,HH,mm,ss");
private static String tagsHTML = null;
public static void pageHead(PrintWriter out, String title, String headers) {
out.println("");
out.print("");
out.print("
");
- out.print("");
+ out.print("");
out.print("");
- out.print("");
+ out.print("");
if (headers != null) {
out.print(headers);
}
@@ -70,11 +69,10 @@ public class PageTemplates {
public static void pageNavigation(PrintWriter out, com.juick.User visitor, String search) {
out.println("");
}
- public static void pageYandexAd(PrintWriter out, int stat_id) {
- out.println("");
+ public static void pageYandexAd(PrintWriter out, int YandexID) {
+ out.println("");
out.println("");
+ }
+
+ out.println("");
}
public static void pageEnd(PrintWriter out) {
@@ -448,34 +456,7 @@ public class PageTemplates {
for (int i = 0; i < msgs.size(); i++) {
if (i == 1 && YandexID > 0 && ad_mid == 0) {
- out.println(" ");
- out.println("");
+ pageYandexAd(out, YandexID);
}
com.juick.Message msg = msgs.get(i);
@@ -484,19 +465,11 @@ public class PageTemplates {
if (msg.ReadOnly) {
tags += " *readonly";
}
- switch (msg.Privacy) {
- case 2:
- tags += " *public";
- break;
- case -1:
- tags += " *friends";
- break;
- case -2:
- tags += " *friends";
- break;
- case -3:
- tags += " *private";
- break;
+ if (msg.Privacy < 0) {
+ tags += " *friends";
+ }
+ if (msg.MID == ad_mid) {
+ tags += " *реклама";
}
String txt;
@@ -506,40 +479,32 @@ public class PageTemplates {
txt = formatMessage(msg.Text);
}
- if (!tags.isEmpty()) {
- tags = "" + tags + "";
- }
-
- out.println(" ");
- out.println(" ");
- out.println(" ");
- out.println(" ");
- out.println(" ");
- out.print("
");
-
- out.print("
" + txt + "
");
-
+ out.println("
");
+ out.println(" ");
+ out.println(" ");
+ out.println(" ");
+ out.println(" " + txt + "
");
if (msg.AttachmentType != null) {
- out.println(" ");
+ out.println(" ![\"\"/](\"//i.juick.com/photos-512/")
");
}
+ out.print(" ");
+
+ out.print(" ");
- out.println(" ");
+ out.println("");
+ out.println("");
}
}
}
--
cgit v1.2.3