changeset 2456:059b439bea9e

fixes showing comment option from the user settings
author sharky93 <rishabhr123@gmail.com>
date Mon, 09 Sep 2013 05:29:54 +0530
parents 780b7c4c49e2
children 17a40164f8b4
files MoinMoin/templates/common.js MoinMoin/themes/basic/templates/show.html
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/templates/common.js	Sun Sep 08 22:35:13 2013 +0530
+++ b/MoinMoin/templates/common.js	Mon Sep 09 05:29:54 2013 +0530
@@ -73,6 +73,11 @@
         if (!document.getElementById('moin-show-comments')) {
             toggleComments();
         }
+        else {
+            var commentButton = $('.moin-toggle-comments-button');
+            commentButton.button('toggle');
+            {{ "commentButton.attr('title', '%s');" % _("Hide comments") }}
+        }
     }
 }
 $(document).ready(initToggleComments);
--- a/MoinMoin/themes/basic/templates/show.html	Sun Sep 08 22:35:13 2013 +0530
+++ b/MoinMoin/themes/basic/templates/show.html	Mon Sep 09 05:29:54 2013 +0530
@@ -60,4 +60,10 @@
         {{ self.item_actions() }}
     </div>
 
-{% endblock %}
\ No newline at end of file
+{% endblock %}
+
+{% block options_for_javascript %}
+{%- if user.show_comments -%}
+    <br id="moin-show-comments" />
+{%- endif %}
+{% endblock %}