web/component.py
branchtls-sprint
changeset 880 d46cf89ead07
parent 838 f2c56312b03a
child 883 44f1aba675de
equal deleted inserted replaced
879:329fd038c5a3 880:d46cf89ead07
    50                             help=_('html class of the component')),
    50                             help=_('html class of the component')),
    51     }
    51     }
    52     
    52     
    53     context = 'navcontentbottom' # 'footer' | 'header' | 'incontext'
    53     context = 'navcontentbottom' # 'footer' | 'header' | 'incontext'
    54     
    54     
    55     def call(self, view):
    55     def call(self, view=None):
    56         return self.cell_call(0, 0, view)
    56         return self.cell_call(0, 0, view)
    57 
    57 
    58     def cell_call(self, row, col, view):
    58     def cell_call(self, row, col, view=None):
    59         raise NotImplementedError()
    59         raise NotImplementedError()
    60 
    60 
    61     
    61     
    62 class NavigationComponent(Component):
    62 class NavigationComponent(Component):
    63     """abstract base class for navigation components"""
    63     """abstract base class for navigation components"""
   140         return self.next_page_link_templ % (url, title, content)
   140         return self.next_page_link_templ % (url, title, content)
   141 
   141 
   142 
   142 
   143 class RelatedObjectsVComponent(EntityVComponent):
   143 class RelatedObjectsVComponent(EntityVComponent):
   144     """a section to display some related entities"""
   144     """a section to display some related entities"""
       
   145     __select__ = partial_relation_possible() & partial_has_related_entities()
       
   146     
   145     vid = 'list'
   147     vid = 'list'
   146     __select__ = partial_relation_possible() & partial_has_related_entities()
       
   147     
   148     
   148     def rql(self):
   149     def rql(self):
   149         """override this method if you want to use a custom rql query"""
   150         """override this method if you want to use a custom rql query"""
   150         return None
   151         return None
   151     
   152