equal
deleted
inserted
replaced
384 |
384 |
385 VRegistry.REGISTRY_FACTORY['views'] = ViewsRegistry |
385 VRegistry.REGISTRY_FACTORY['views'] = ViewsRegistry |
386 |
386 |
387 |
387 |
388 class ActionsRegistry(CWRegistry): |
388 class ActionsRegistry(CWRegistry): |
|
389 def poss_visible_objects(self, *args, **kwargs): |
|
390 """return an ordered list of possible actions""" |
|
391 return sorted(self.possible_objects(*args, **kwargs), |
|
392 key=lambda x: x.order) |
389 |
393 |
390 def possible_actions(self, req, rset=None, **kwargs): |
394 def possible_actions(self, req, rset=None, **kwargs): |
391 if rset is None: |
395 if rset is None: |
392 actions = self.poss_visible_objects(req, rset=rset, **kwargs) |
396 actions = self.poss_visible_objects(req, rset=rset, **kwargs) |
393 else: |
397 else: |