[footer template] refactor to ease addition of some content into the footer stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 06 Jan 2011 11:56:06 +0100
branchstable
changeset 6786 ce35c6f2f219
parent 6785 c462147c9315
child 6787 aede8c85207f
[footer template] refactor to ease addition of some content into the footer
web/views/basetemplates.py
--- a/web/views/basetemplates.py	Thu Jan 06 11:55:31 2011 +0100
+++ b/web/views/basetemplates.py	Thu Jan 06 11:56:06 2011 +0100
@@ -367,13 +367,15 @@
 
 
 class HTMLPageFooter(View):
-    """default html page footer: include footer actions
-    """
+    """default html page footer: include footer actions"""
     __regid__ = 'footer'
 
     def call(self, **kwargs):
-        req = self._cw
         self.w(u'<div id="footer">')
+        self.footer_content()
+        self.w(u'</div>')
+
+    def footer_content(self):
         actions = self._cw.vreg['actions'].possible_actions(self._cw,
                                                             rset=self.cw_rset)
         footeractions = actions.get('footer', ())
@@ -382,8 +384,6 @@
                                              self._cw._(action.title)))
             if i < (len(footeractions) - 1):
                 self.w(u' | ')
-        self.w(u'</div>')
-
 
 class HTMLContentHeader(View):
     """default html page content header: