web/views/basetemplates.py
branchstable
changeset 6697 ffc644fafcb4
parent 6678 5726677f0ae7
child 6764 b2c1b481f310
equal deleted inserted replaced
6696:160ca95eb4cc 6697:ffc644fafcb4
   326 
   326 
   327 class HTMLPageHeader(View):
   327 class HTMLPageHeader(View):
   328     """default html page header"""
   328     """default html page header"""
   329     __regid__ = 'header'
   329     __regid__ = 'header'
   330     main_cell_components = ('appliname', 'breadcrumbs')
   330     main_cell_components = ('appliname', 'breadcrumbs')
       
   331     headers = (('headtext', 'header-left'),
       
   332                ('header-right', 'header-right'))
   331 
   333 
   332     def call(self, view, **kwargs):
   334     def call(self, view, **kwargs):
   333         self.main_header(view)
   335         self.main_header(view)
   334         self.w(u'<div id="stateheader">')
   336         self.w(u'<div id="stateheader">')
   335         self.state_header()
   337         self.state_header()
   337 
   339 
   338     def main_header(self, view):
   340     def main_header(self, view):
   339         """build the top menu with authentification info and the rql box"""
   341         """build the top menu with authentification info and the rql box"""
   340         w = self.w
   342         w = self.w
   341         w(u'<table id="header"><tr>\n')
   343         w(u'<table id="header"><tr>\n')
   342         for colid, context in (('headtext', 'header-left'),
   344         for colid, context in self.headers:
   343                                ('header-right', 'header-right'),
       
   344                                ):
       
   345             w(u'<td id="%s">' % colid)
   345             w(u'<td id="%s">' % colid)
   346             components = self._cw.vreg['ctxcomponents'].poss_visible_objects(
   346             components = self._cw.vreg['ctxcomponents'].poss_visible_objects(
   347                 self._cw, rset=self.cw_rset, view=view, context=context)
   347                 self._cw, rset=self.cw_rset, view=view, context=context)
   348             for comp in components:
   348             for comp in components:
   349                 comp.render(w=w)
   349                 comp.render(w=w)