web/views/basecontrollers.py
branchtls-sprint
changeset 644 5e5b296a657e
parent 635 305da8d6aa2d
parent 643 616191014b8b
child 692 800592b8d39b
--- a/web/views/basecontrollers.py	Mon Feb 16 20:51:24 2009 +0100
+++ b/web/views/basecontrollers.py	Mon Feb 16 20:51:41 2009 +0100
@@ -211,14 +211,14 @@
             self.req.set_content_type(content_type)
             return xmlize(data)
         return data
-
+    
     def html_exec(self, rset=None):
-        """html mode: execute query and return the view as HTML"""
+        # XXX try to use the page-content template
         req = self.req
         rql = req.form.get('rql')
         if rset is None and rql:
             rset = self._exec(rql)
-            
+        
         vid = req.form.get('vid') or vid_from_rset(req, rset, self.schema)
         try:
             view = self.vreg.select_view(vid, req, rset)
@@ -239,6 +239,10 @@
             if divid == 'pageContent':
                 stream.write(u'<div id="contentmain">')
         view.dispatch()
+        extresources = req.html_headers.getvalue(skiphead=True)
+        stream.write(u'<div class="ajaxHtmlHead">\n') # XXX use a widget ?
+        stream.write(extresources)
+        stream.write(u'</div>\n')
         if req.form.get('paginate') and divid == 'pageContent':
             stream.write(u'</div></div>')
         source = stream.getvalue()