web/views/basetemplates.py
branchstable
changeset 3053 51f196c212d9
parent 3020 36c5f21c8de7
child 3071 6ad4e6d4df86
child 3166 2413e5291e8d
equal deleted inserted replaced
3049:cb13d9b6c29e 3053:51f196c212d9
   313 
   313 
   314 
   314 
   315 class HTMLPageHeader(View):
   315 class HTMLPageHeader(View):
   316     """default html page header"""
   316     """default html page header"""
   317     id = 'header'
   317     id = 'header'
       
   318     main_cell_components = ('appliname', 'breadcrumbs')
   318 
   319 
   319     def call(self, view, **kwargs):
   320     def call(self, view, **kwargs):
   320         self.main_header(view)
   321         self.main_header(view)
   321         self.w(u'''
   322         self.w(u'''
   322   <div id="stateheader">''')
   323   <div id="stateheader">''')
   334         if logo:
   335         if logo:
   335             logo.render(w=self.w)
   336             logo.render(w=self.w)
   336         self.w(u'</td>\n')
   337         self.w(u'</td>\n')
   337         # appliname and breadcrumbs
   338         # appliname and breadcrumbs
   338         self.w(u'<td id="headtext">')
   339         self.w(u'<td id="headtext">')
   339         for cid in ('appliname', 'breadcrumbs'):
   340         for cid in self.main_cell_components:
   340             comp = self.vreg['components'].select_vobject(
   341             comp = self.vreg['components'].select_vobject(
   341                 cid, self.req, rset=self.rset)
   342                 cid, self.req, rset=self.rset)
   342             if comp:
   343             if comp:
   343                 comp.render(w=self.w)
   344                 comp.render(w=self.w)
   344         self.w(u'</td>')
   345         self.w(u'</td>')