web/views/boxes.py
branchtls-sprint
changeset 742 99115e029dca
parent 663 482d39578366
child 809 31962f99770b
equal deleted inserted replaced
739:39721e56b56d 742:99115e029dca
    27 class EditBox(BoxTemplate):
    27 class EditBox(BoxTemplate):
    28     """
    28     """
    29     box with all actions impacting the entity displayed: edit, copy, delete
    29     box with all actions impacting the entity displayed: edit, copy, delete
    30     change state, add related entities
    30     change state, add related entities
    31     """
    31     """
    32     __selectors__ = (any_rset,) + BoxTemplate.__selectors__
    32     __select__ = any_rset() & BoxTemplate.__select__
    33     id = 'edit_box'
    33     id = 'edit_box'
    34     title = _('actions')
    34     title = _('actions')
    35     order = 2
    35     order = 2
    36 
    36 
    37     def call(self, **kwargs):
    37     def call(self, **kwargs):
   164 # boxes disabled by default ###################################################
   164 # boxes disabled by default ###################################################
   165 
   165 
   166 class PossibleViewsBox(BoxTemplate):
   166 class PossibleViewsBox(BoxTemplate):
   167     """display a box containing links to all possible views"""
   167     """display a box containing links to all possible views"""
   168     id = 'possible_views_box'
   168     id = 'possible_views_box'
   169     __selectors__ = (match_user_groups('users', 'managers'),)
   169     __select__ = match_user_groups('users', 'managers')
   170     
   170     
   171     title = _('possible views')
   171     title = _('possible views')
   172     order = 10
   172     order = 10
   173     visible = False
   173     visible = False
   174 
   174 
   186 
   186 
   187         
   187         
   188 class RSSIconBox(BoxTemplate):
   188 class RSSIconBox(BoxTemplate):
   189     """just display the RSS icon on uniform result set"""
   189     """just display the RSS icon on uniform result set"""
   190     id = 'rss'
   190     id = 'rss'
   191     __selectors__ = BoxTemplate.__selectors__ + (appobject_selectable('components', 'rss_feed_url'),)
   191     __select__ = (BoxTemplate.__select__
       
   192                   & appobject_selectable('components', 'rss_feed_url'))
   192     
   193     
   193     order = 999
   194     order = 999
   194     visible = False
   195     visible = False
   195     
   196     
   196     def call(self, **kwargs):
   197     def call(self, **kwargs):