diff --git a/views/basetemplates.py b/views/basetemplates.py index 6695480c23c4e27dacb57b48db96afae49a98a7f_dmlld3MvYmFzZXRlbXBsYXRlcy5weQ==..61da700ea4cfe3e98e11d2533cc59b2e3ed94902_dmlld3MvYmFzZXRlbXBsYXRlcy5weQ== 100644 --- a/views/basetemplates.py +++ b/views/basetemplates.py @@ -150,6 +150,4 @@ @monkeypatch(basetemplates.TheMainTemplate) def content_footer(self, view=None): - # TODO : do not add the wrapping div if no data - self.w(u'<div class="row">') # metadata and so self.wview('contentfooter', rset=self.cw_rset, view=view) @@ -155,5 +153,4 @@ self.wview('contentfooter', rset=self.cw_rset, view=view) - self.w(u'</div>\n') # closes row @monkeypatch(basetemplates.TheMainTemplate) @@ -271,6 +268,20 @@ self.w(u'</div>') self.w(u'</nav>') + +@monkeypatch(basetemplates.HTMLContentFooter) +def call(self, view, **kwargs): + components = self._cw.vreg['ctxcomponents'].poss_visible_objects( + self._cw, rset=self.cw_rset, view=view, context='navbottom') + if components: + # the row is needed here to correctly put the HTML flux + self.w(u'<div class="row">') + self.w(u'<div id="contentfooter">') + for comp in components: + comp.render(w=self.w, view=view) + self.w(u'</div>') + self.w(u'</div>') + @monkeypatch(basetemplates.HTMLPageFooter) def call(self, **kwargs): self.w(u'<footer id="pagefooter">') @@ -274,5 +285,4 @@ @monkeypatch(basetemplates.HTMLPageFooter) def call(self, **kwargs): self.w(u'<footer id="pagefooter">') - self.w(u'<div id="footer" class="container">') self.footer_content() @@ -278,5 +288,4 @@ self.footer_content() - self.w(u'</div>\n') self.w(u'</footer>\n') def registration_callback(vreg):