web/views/basetemplates.py
brancholdstable
changeset 8462 a14b6562082b
parent 8269 80d37fb56312
child 8307 8be58694f416
equal deleted inserted replaced
8231:1bb43e31032d 8462:a14b6562082b
   136         etypefilter = self._cw.vreg['components'].select_or_none(
   136         etypefilter = self._cw.vreg['components'].select_or_none(
   137             'etypenavigation', self._cw, rset=self.cw_rset)
   137             'etypenavigation', self._cw, rset=self.cw_rset)
   138         if etypefilter and etypefilter.cw_propval('visible'):
   138         if etypefilter and etypefilter.cw_propval('visible'):
   139             etypefilter.render(w=w)
   139             etypefilter.render(w=w)
   140         nav_html = UStringIO()
   140         nav_html = UStringIO()
   141         if view:
   141         if view and not view.handle_pagination:
   142             view.paginate(w=nav_html.write)
   142             view.paginate(w=nav_html.write)
   143         w(nav_html.getvalue())
   143         w(nav_html.getvalue())
   144         w(u'<div id="contentmain">\n')
   144         w(u'<div id="contentmain">\n')
   145         view.render(w=w)
   145         view.render(w=w)
   146         w(u'</div>\n') # close id=contentmain
   146         w(u'</div>\n') # close id=contentmain
   254         whead(u'<meta http-equiv="content-type" content="%s; charset=%s"/>\n'
   254         whead(u'<meta http-equiv="content-type" content="%s; charset=%s"/>\n'
   255               % (content_type, self._cw.encoding))
   255               % (content_type, self._cw.encoding))
   256         whead(u'\n'.join(additional_headers) + u'\n')
   256         whead(u'\n'.join(additional_headers) + u'\n')
   257         self.wview('htmlheader', rset=self.cw_rset)
   257         self.wview('htmlheader', rset=self.cw_rset)
   258         w = self.w
   258         w = self.w
   259         w(u'<title>%s</title>\n' % xml_escape(page_title))
   259         whead(u'<title>%s</title>\n' % xml_escape(page_title))
   260         w(u'<body>\n')
   260         w(u'<body>\n')
   261         w(u'<div id="page">')
   261         w(u'<div id="page">')
   262         w(u'<table width="100%" height="100%" border="0"><tr>\n')
   262         w(u'<table width="100%" border="0" id="mainLayout"><tr>\n')
   263         w(u'<td id="navColumnLeft">\n')
   263         w(u'<td id="navColumnLeft">\n')
   264         self.topleft_header()
   264         self.topleft_header()
   265         boxes = list(self._cw.vreg['ctxcomponents'].poss_visible_objects(
   265         boxes = list(self._cw.vreg['ctxcomponents'].poss_visible_objects(
   266             self._cw, rset=self.cw_rset, view=view, context='left'))
   266             self._cw, rset=self.cw_rset, view=view, context='left'))
   267         if boxes:
   267         if boxes:
   268             w(u'<div class="navboxes">\n')
   268             w(u'<div class="navboxes">\n')
   269             for box in boxes:
   269             for box in boxes:
   270                 box.render(w=w)
   270                 box.render(w=w)
   271             self.w(u'</div>\n')
   271             self.w(u'</div>\n')
   272         w(u'</td>')
   272         w(u'</td>')
   273         w(u'<td id="contentcol" rowspan="2">')
   273         w(u'<td id="contentColumn" rowspan="2">')
   274         w(u'<div id="pageContent">\n')
       
   275         vtitle = self._cw.form.get('vtitle')
       
   276         if vtitle:
       
   277             w(u'<div class="vtitle">%s</div>' % xml_escape(vtitle))
       
   278 
   274 
   279     def topleft_header(self):
   275     def topleft_header(self):
   280         logo = self._cw.vreg['components'].select_or_none('logo', self._cw,
   276         logo = self._cw.vreg['components'].select_or_none('logo', self._cw,
   281                                                           rset=self.cw_rset)
   277                                                           rset=self.cw_rset)
   282         if logo and logo.cw_propval('visible'):
   278         if logo and logo.cw_propval('visible'):