web/views/tableview.py
branch3.5
changeset 3228 7b05b2709439
parent 3129 fab471bee6c1
child 3230 1d25e928c299
child 3689 deb13e88e037
--- a/web/views/tableview.py	Tue Sep 15 14:48:13 2009 +0200
+++ b/web/views/tableview.py	Tue Sep 15 14:49:30 2009 +0200
@@ -144,8 +144,11 @@
             actions += self.show_hide_actions(divid, True)
         self.w(u'<div id="%s"' % divid)
         if displayactions:
-            for action in self.vreg['actions'].possible_actions(req, self.rset).get('mainactions', ()):
-                actions.append( (action.url(), req._(action.title), action.html_class(), None) )
+            actionsbycat = self.vreg['actions'].possible_actions(req, self.rset)
+            for action in actionsbycat.get('mainactions', ()):
+                for action in action.actual_actions():
+                    actions.append( (action.url(), req._(action.title),
+                                     action.html_class(), None) )
             self.w(u' cubicweb:displayactions="1">') # close <div tag
         else:
             self.w(u'>') # close <div tag