From: David ‘Bombe’ Roden Date: Sat, 23 Oct 2010 01:12:10 +0000 (+0200) Subject: Don’t add comment links when nobody is logged in. X-Git-Tag: 0.1-RC1~68 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=4e34c48253d399f44af1adac3b71207ec50101fe;p=Sone.git Don’t add comment links when nobody is logged in. --- 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>