web/views/tableview.py
changeset 3230 1d25e928c299
parent 3163 edfe43ceaa35
parent 3228 7b05b2709439
child 3377 dd9d292b6a6d
equal deleted inserted replaced
3199:fc63b80ec979 3230:1d25e928c299
   142                                             displayactions)
   142                                             displayactions)
   143         elif displayfilter:
   143         elif displayfilter:
   144             actions += self.show_hide_actions(divid, True)
   144             actions += self.show_hide_actions(divid, True)
   145         self.w(u'<div id="%s"' % divid)
   145         self.w(u'<div id="%s"' % divid)
   146         if displayactions:
   146         if displayactions:
   147             for action in self.vreg['actions'].possible_actions(req, self.rset).get('mainactions', ()):
   147             actionsbycat = self.vreg['actions'].possible_actions(req, self.rset)
   148                 actions.append( (action.url(), req._(action.title), action.html_class(), None) )
   148             for action in actionsbycat.get('mainactions', ()):
       
   149                 for action in action.actual_actions():
       
   150                     actions.append( (action.url(), req._(action.title),
       
   151                                      action.html_class(), None) )
   149             self.w(u' cubicweb:displayactions="1">') # close <div tag
   152             self.w(u' cubicweb:displayactions="1">') # close <div tag
   150         else:
   153         else:
   151             self.w(u'>') # close <div tag
   154             self.w(u'>') # close <div tag
   152         # render actions menu
   155         # render actions menu
   153         if actions:
   156         if actions: