web/action.py
branch3.5
changeset 3228 7b05b2709439
parent 3220 11b6016e3970
child 3230 1d25e928c299
child 3272 f46f2082468b
--- a/web/action.py	Tue Sep 15 14:48:13 2009 +0200
+++ b/web/action.py	Tue Sep 15 14:49:30 2009 +0200
@@ -37,9 +37,13 @@
     # actions in category 'moreactions' can specify a sub-menu in which they should be filed
     submenu = None
 
+    def actual_actions(self):
+        yield self
+
     def fill_menu(self, box, menu):
         """add action(s) to the given submenu of the given box"""
-        menu.append(box.box_action(self))
+        for action in self.actual_actions():
+            menu.append(box.box_action(action))
 
     def url(self):
         """return the url associated with this action"""
@@ -51,6 +55,9 @@
         if self.category:
             return 'box' + self.category.capitalize()
 
+    def build_action(self, title, path, **kwargs):
+        return UnregisteredAction(self.req, self.rset, title, path, **kwargs)
+
 
 class UnregisteredAction(Action):
     """non registered action used to build boxes. Unless you set them