[basetemplates] define header ctx components categories as attribute to ease overriding stable
authorJulien Jehannet <julien.jehannet@logilab.fr>
Tue, 09 Nov 2010 15:47:02 +0100
branchstable
changeset 6697 ffc644fafcb4
parent 6696 160ca95eb4cc
child 6698 b353e868b74f
[basetemplates] define header ctx components categories as attribute to ease overriding
web/views/basetemplates.py
--- a/web/views/basetemplates.py	Tue Nov 09 10:18:56 2010 +0100
+++ b/web/views/basetemplates.py	Tue Nov 09 15:47:02 2010 +0100
@@ -328,6 +328,8 @@
     """default html page header"""
     __regid__ = 'header'
     main_cell_components = ('appliname', 'breadcrumbs')
+    headers = (('headtext', 'header-left'),
+               ('header-right', 'header-right'))
 
     def call(self, view, **kwargs):
         self.main_header(view)
@@ -339,9 +341,7 @@
         """build the top menu with authentification info and the rql box"""
         w = self.w
         w(u'<table id="header"><tr>\n')
-        for colid, context in (('headtext', 'header-left'),
-                               ('header-right', 'header-right'),
-                               ):
+        for colid, context in self.headers:
             w(u'<td id="%s">' % colid)
             components = self._cw.vreg['ctxcomponents'].poss_visible_objects(
                 self._cw, rset=self.cw_rset, view=view, context=context)