From 4e34c48253d399f44af1adac3b71207ec50101fe Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 23 Oct 2010 03:12:10 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20add=20comment=20links=20when=20n?= =?utf8?q?obody=20is=20logged=20in.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/javascript/sone.js | 3 +++ src/main/resources/templates/include/viewPost.html | 20 +++++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/main/resources/static/javascript/sone.js b/src/main/resources/static/javascript/sone.js index cd27cc3..9bb379c 100644 --- a/src/main/resources/static/javascript/sone.js +++ b/src/main/resources/static/javascript/sone.js @@ -46,6 +46,9 @@ function registerInputTextareaSwap(inputSelector, defaultText, inputFieldName, o /* hide all the “create reply” forms until a link is clicked. */ function addCommentLinks() { + if (!isOnline()) { + return; + } $("#sone .post").each(function() { postId = $(this).attr("id"); commentElement = (function(postId) { diff --git a/src/main/resources/templates/include/viewPost.html b/src/main/resources/templates/include/viewPost.html index 1f0020c..c3ad07a 100644 --- a/src/main/resources/templates/include/viewPost.html +++ b/src/main/resources/templates/include/viewPost.html @@ -49,14 +49,16 @@ <%/foreach> -
-
- - - - - -
-
+ <%ifnull ! currentSone> +
+
+ + + + + +
+
+ <%/if> -- 2.7.4