web/views/basetemplates.py
changeset 3072 6fb42c53f6df
parent 3023 7864fee8b4ec
parent 3071 6ad4e6d4df86
child 3085 b415bca9a9ed
equal deleted inserted replaced
3035:2e4a381ea5b7 3072:6fb42c53f6df
   350 
   350 
   351 
   351 
   352 class HTMLPageHeader(View):
   352 class HTMLPageHeader(View):
   353     """default html page header"""
   353     """default html page header"""
   354     id = 'header'
   354     id = 'header'
       
   355     main_cell_components = ('appliname', 'breadcrumbs')
   355 
   356 
   356     def call(self, view, **kwargs):
   357     def call(self, view, **kwargs):
   357         self.main_header(view)
   358         self.main_header(view)
   358         self.w(u'''
   359         self.w(u'''
   359   <div id="stateheader">''')
   360   <div id="stateheader">''')
   371         if logo and logo.cw_propval('visible'):
   372         if logo and logo.cw_propval('visible'):
   372             logo.render(w=self.w)
   373             logo.render(w=self.w)
   373         self.w(u'</td>\n')
   374         self.w(u'</td>\n')
   374         # appliname and breadcrumbs
   375         # appliname and breadcrumbs
   375         self.w(u'<td id="headtext">')
   376         self.w(u'<td id="headtext">')
   376         for cid in ('appliname', 'breadcrumbs'):
   377         for cid in self.main_cell_components:
   377             comp = self.vreg['components'].select_or_none(
   378             comp = self.vreg['components'].select_or_none(
   378                 cid, self.req, rset=self.rset)
   379                 cid, self.req, rset=self.rset)
   379             if comp and comp.cw_propval('visible'):
   380             if comp and comp.cw_propval('visible'):
   380                 comp.render(w=self.w)
   381                 comp.render(w=self.w)
   381         self.w(u'</td>')
   382         self.w(u'</td>')