diff MoinMoin/themes/__init__.py @ 2381:aa19b1b69b5c

adds helper function to render the local panel
author sharky93 <rishabhr123@gmail.com>
date Sat, 17 Aug 2013 02:50:14 +0530
parents 7df17df524e7
children 9bf41329f031
line wrap: on
line diff
--- a/MoinMoin/themes/__init__.py	Sat Aug 17 00:21:30 2013 +0530
+++ b/MoinMoin/themes/__init__.py	Sat Aug 17 02:50:14 2013 +0530
@@ -87,6 +87,13 @@
             navtabs.append('frontend.modify_item')
         return navtabs
 
+    def get_local_panel(self, item_name):
+        user_actions = ['frontend.quicklink_item', 'frontend.subscribe_item', ]
+        item_navigation = ['frontend.index', 'frontend.sitemap', ]
+        item_actions = ['frontend.rename_item', 'frontend.delete_item', 'frontend.destroy_item',
+                'frontend.similar_names', 'frontend.download_item', 'frontend.copy_item',] if self.user.may.write(item_name) else []
+        return user_actions, item_navigation, item_actions
+
     def location_breadcrumbs(self, item_name):
         """
         Assemble the location using breadcrumbs (was: title)