From e67f01bb08125eae47c42965367dc96624e5f146 Mon Sep 17 00:00:00 2001 From: Ugnich Anton Date: Sun, 23 Feb 2014 12:11:58 +0700 Subject: isMobileRequest --- src/java/com/juick/http/www/User.java | 40 ++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) (limited to 'src/java/com/juick/http/www/User.java') diff --git a/src/java/com/juick/http/www/User.java b/src/java/com/juick/http/www/User.java index 1e469a1d..c673edbd 100644 --- a/src/java/com/juick/http/www/User.java +++ b/src/java/com/juick/http/www/User.java @@ -109,7 +109,10 @@ public class User { PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, title, ""); - PageTemplates.pageNavigation(out, visitor, null); + + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageNavigation(out, visitor, null); + } pageUserColumn(out, sql, user, visitor); @@ -134,7 +137,10 @@ public class User { out.println(""); } - PageTemplates.pageFooter(request, out, visitor, true); + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageFooter(request, out, visitor, true); + } + PageTemplates.pageDialogTemplate(out); PageTemplates.pageEnd(out); } finally { @@ -149,7 +155,10 @@ public class User { PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, "Теги " + user.UName, null); - PageTemplates.pageNavigation(out, visitor, null); + + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageNavigation(out, visitor, null); + } pageUserColumn(out, sql, user, visitor); @@ -157,7 +166,10 @@ public class User { out.println("
" + pageUserTags(sql, user, visitor, 0) + "
"); out.println(""); - PageTemplates.pageFooter(request, out, visitor, false); + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageFooter(request, out, visitor, false); + } + PageTemplates.pageDialogTemplate(out); PageTemplates.pageEnd(out); } finally { @@ -172,7 +184,10 @@ public class User { PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, "Подписки " + user.UName, null); - PageTemplates.pageNavigation(out, visitor, null); + + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageNavigation(out, visitor, null); + } pageUserColumn(out, sql, user, visitor); @@ -203,7 +218,10 @@ public class User { out.println(""); out.println(""); - PageTemplates.pageFooter(request, out, visitor, false); + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageFooter(request, out, visitor, false); + } + PageTemplates.pageDialogTemplate(out); PageTemplates.pageEnd(out); } finally { @@ -218,7 +236,10 @@ public class User { PrintWriter out = response.getWriter(); try { PageTemplates.pageHead(out, "Читатели " + user.UName, null); - PageTemplates.pageNavigation(out, visitor, null); + + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageNavigation(out, visitor, null); + } pageUserColumn(out, sql, user, visitor); @@ -249,7 +270,10 @@ public class User { out.println(""); out.println(""); - PageTemplates.pageFooter(request, out, visitor, false); + if (!Utils.isMobileRequest(request)) { + PageTemplates.pageFooter(request, out, visitor, false); + } + PageTemplates.pageDialogTemplate(out); PageTemplates.pageEnd(out); } finally { -- cgit v1.2.3