diff MoinMoin/theme/__init__.py @ 1752:6f8360e1a4bb

wrapping div support for wiki parser, toggling display of comment divs, show_comments user prefs
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 28 Jan 2007 22:40:49 +0100
parents b7e0a36a1219
children 885c97f7ba37
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py	Sun Jan 21 19:43:34 2007 +0100
+++ b/MoinMoin/theme/__init__.py	Sun Jan 28 22:40:49 2007 +0100
@@ -1053,6 +1053,7 @@
         This is separate method to make it easy to customize the
         edtibar in sub classes.
         """
+        _ = self.request.getText
         editbar_actions = []
         for editbar_item in self.request.cfg.edit_bar:
              if editbar_item == 'Discussion':
@@ -1060,16 +1061,19 @@
                      editbar_actions.append(self.supplementation_page_nameLink(page))
                  elif self.request.cfg.supplementation_page and not self.request.getPragma('supplementation-page', 1) in ('off', '0'):
                      editbar_actions.append(self.supplementation_page_nameLink(page))
+             elif editbar_item == 'Comments':
+                 # we just use <a> to get same style as other links: 
+                 editbar_actions.append('<a id="toggleCommentsButton" onClick="toggleComments();">%s</a>' % _('Comments'))
              elif editbar_item == 'Edit':
-                  editbar_actions.append(self.editorLink(page))
+                 editbar_actions.append(self.editorLink(page))
              elif editbar_item == 'Info':
-                  editbar_actions.append(self.infoLink(page))
+                 editbar_actions.append(self.infoLink(page))
              elif editbar_item == 'Subscribe':
-                  editbar_actions.append(self.subscribeLink(page))
+                 editbar_actions.append(self.subscribeLink(page))
              elif editbar_item == 'Quicklink':
-                  editbar_actions.append(self.quicklinkLink(page))
+                 editbar_actions.append(self.quicklinkLink(page))
              elif editbar_item == 'Attachments':
-                  editbar_actions.append(self.attachmentsLink(page))
+                 editbar_actions.append(self.attachmentsLink(page))
              elif editbar_item == 'ActionsMenu':
                  editbar_actions.append(self.actionsMenu(page))
         return editbar_actions