diff MoinMoin/themes/__init__.py @ 2380:7df17df524e7

adds helper function to render action tabs
author sharky93 <rishabhr123@gmail.com>
date Sat, 17 Aug 2013 00:21:30 +0530
parents 5d61b26cad7c
children aa19b1b69b5c
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Wed Aug 14 20:50:04 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Sat Aug 17 00:21:30 2013 +0530
@@ -79,6 +79,14 @@
         self.content_dir = 'ltr'  # XXX
         self.meta_items = []  # list of (name, content) for html head <meta>
 
+    def get_action_tabs(self, item_name):
+        navtabs = ['frontend.show_item', 'frontend.history',
+                'frontend.show_item_meta', 'frontend.highlight_item', 'frontend.backrefs',
+                'special.comments', 'special.transclusions',]
+        if self.user.may.write(item_name):
+            navtabs.append('frontend.modify_item')
+        return navtabs
+
     def location_breadcrumbs(self, item_name):
         """
         Assemble the location using breadcrumbs (was: title)