--- a/cubicweb/web/views/ajaxcontroller.py Mon Jun 19 18:15:28 2017 +0200
+++ b/cubicweb/web/views/ajaxcontroller.py Fri Apr 21 14:01:46 2017 +0200
@@ -241,29 +241,25 @@
stream = UStringIO()
kwargs['w'] = stream.write
assert not paginate
- if divid == 'pageContent':
+ if divid == 'contentmain':
# ensure divid isn't reused by the view (e.g. table view)
del self._cw.form['divid']
- # mimick main template behaviour
- stream.write(u'<div id="pageContent">')
- vtitle = self._cw.form.get('vtitle')
- if vtitle:
- stream.write(u'<h1 class="vtitle">%s</h1>\n' % vtitle)
paginate = True
+ if divid == 'contentmain':
+ stream.write(u'<div id="contentmain">')
nav_html = UStringIO()
if paginate and not view.handle_pagination:
view.paginate(w=nav_html.write)
stream.write(nav_html.getvalue())
- if divid == 'pageContent':
- stream.write(u'<div id="contentmain">')
view.render(**kwargs)
+ stream.write(nav_html.getvalue())
+ if divid == 'contentmain':
+ stream.write(u'</div>')
extresources = self._cw.html_headers.getvalue(skiphead=True)
if extresources:
stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget?
stream.write(extresources)
stream.write(u'</div>\n')
- if divid == 'pageContent':
- stream.write(u'</div>%s</div>' % nav_html.getvalue())
return stream.getvalue()