diff options
Diffstat (limited to 'src/java/com/juick/http')
-rw-r--r-- | src/java/com/juick/http/www/Discover.java | 2 | ||||
-rw-r--r-- | src/java/com/juick/http/www/Home.java | 2 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PM.java | 4 | ||||
-rw-r--r-- | src/java/com/juick/http/www/PageTemplates.java | 12 |
4 files changed, 11 insertions, 9 deletions
diff --git a/src/java/com/juick/http/www/Discover.java b/src/java/com/juick/http/www/Discover.java index 5e24889b..98f46656 100644 --- a/src/java/com/juick/http/www/Discover.java +++ b/src/java/com/juick/http/www/Discover.java @@ -92,7 +92,7 @@ public class Discover { out.println("</div>"); out.println("</div>"); // wrapper - PageTemplates.pageHomeColumn(out, sql, locale); + PageTemplates.pageHomeColumn(out, sql, visitor, locale); out.println("</div>"); // topwrapper diff --git a/src/java/com/juick/http/www/Home.java b/src/java/com/juick/http/www/Home.java index 8bf30af5..6833aebb 100644 --- a/src/java/com/juick/http/www/Home.java +++ b/src/java/com/juick/http/www/Home.java @@ -139,7 +139,7 @@ public class Home { out.println("</div>"); out.println("</div>"); // wrapper - PageTemplates.pageHomeColumn(out, sql, locale); + PageTemplates.pageHomeColumn(out, sql, visitor, locale); out.println("</div>"); // topwrapper diff --git a/src/java/com/juick/http/www/PM.java b/src/java/com/juick/http/www/PM.java index b874c065..5c0f67f9 100644 --- a/src/java/com/juick/http/www/PM.java +++ b/src/java/com/juick/http/www/PM.java @@ -103,7 +103,7 @@ public class PM { out.println("</div>"); out.println("</div>"); // wrapper - PageTemplates.pageHomeColumn(out, sql, locale); + PageTemplates.pageHomeColumn(out, sql, visitor, locale); out.println("</div>"); // topwrapper @@ -186,7 +186,7 @@ public class PM { out.println("</div>"); out.println("</div>"); // wrapper - PageTemplates.pageHomeColumn(out, sql, locale); + PageTemplates.pageHomeColumn(out, sql, visitor, locale); out.println("</div>"); // topwrapper diff --git a/src/java/com/juick/http/www/PageTemplates.java b/src/java/com/juick/http/www/PageTemplates.java index f1a1b29d..73910321 100644 --- a/src/java/com/juick/http/www/PageTemplates.java +++ b/src/java/com/juick/http/www/PageTemplates.java @@ -170,7 +170,7 @@ public class PageTemplates { out.println("</script>"); } - public static void pageHomeColumn(PrintWriter out, Connection sql, Locale locale) { + public static void pageHomeColumn(PrintWriter out, Connection sql, com.juick.User visitor, Locale locale) { ResourceBundle rb = ResourceBundle.getBundle("Blogs", locale); if (tagsHTML == null) { @@ -179,10 +179,12 @@ public class PageTemplates { out.println("<div id=\"column\" class=\"abs\">"); out.println(" <ul>"); - out.println(" <li><a href=\"/\">" + rb.getString("My feed") + "</a></li>"); - out.println(" <li><a href=\"/pm/inbox\">" + rb.getString("Private") + "</a> · <a href=\"/pm/sent\">" + rb.getString("Private sent") + "</a></li>"); - out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>"); - out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>"); + if (visitor != null) { + out.println(" <li><a href=\"/\">" + rb.getString("My feed") + "</a></li>"); + out.println(" <li><a href=\"/pm/inbox\">" + rb.getString("Private") + "</a> · <a href=\"/pm/sent\">" + rb.getString("Private sent") + "</a></li>"); + out.println(" <li><a href=\"/?show=discuss\">" + rb.getString("Discussions") + "</a></li>"); + out.println(" <li><a href=\"/?show=recommended\">" + rb.getString("Recommended") + "</a></li>"); + } out.println(" <li class=\"margtop\"><a href=\"/?show=top\">" + rb.getString("Popular") + "</a></li>"); out.println(" <li><a href=\"/?show=all\">" + rb.getString("All messages") + "</a></li>"); out.println(" </ul>"); |