450 def pviews(self, req, rset): |
450 def pviews(self, req, rset): |
451 return sorted((a.__regid__, a.__class__) |
451 return sorted((a.__regid__, a.__class__) |
452 for a in self.vreg['views'].possible_views(req, rset=rset)) |
452 for a in self.vreg['views'].possible_views(req, rset=rset)) |
453 |
453 |
454 def pactions(self, req, rset, |
454 def pactions(self, req, rset, |
455 skipcategories=('addrelated', 'siteactions', 'useractions', 'footer')): |
455 skipcategories=('addrelated', 'siteactions', 'useractions', |
|
456 'footer', 'manage')): |
456 return [(a.__regid__, a.__class__) |
457 return [(a.__regid__, a.__class__) |
457 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset) |
458 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset) |
458 if a.category not in skipcategories] |
459 if a.category not in skipcategories] |
459 |
460 |
460 def pactions_by_cats(self, req, rset, categories=('addrelated',)): |
461 def pactions_by_cats(self, req, rset, categories=('addrelated',)): |
461 return [(a.__regid__, a.__class__) |
462 return [(a.__regid__, a.__class__) |
462 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset) |
463 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset) |
463 if a.category in categories] |
464 if a.category in categories] |
464 |
465 |
465 def pactionsdict(self, req, rset, |
466 def pactionsdict(self, req, rset, |
466 skipcategories=('addrelated', 'siteactions', 'useractions', 'footer')): |
467 skipcategories=('addrelated', 'siteactions', 'useractions', |
|
468 'footer', 'manage')): |
467 res = {} |
469 res = {} |
468 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset): |
470 for a in self.vreg['actions'].poss_visible_objects(req, rset=rset): |
469 if a.category not in skipcategories: |
471 if a.category not in skipcategories: |
470 res.setdefault(a.category, []).append(a.__class__) |
472 res.setdefault(a.category, []).append(a.__class__) |
471 return res |
473 return res |