[tableview,basetemplates,pagination] some views internally handle the pagination, in which case the base template should not try to paginate
authorAurelien Campeas <aurelien.campeas@logilab.fr>
Mon, 24 Oct 2011 08:55:07 +0200
changeset 8009 75638a6ff159
parent 8007 dfbf0c43ee13
child 8012 2080e476ece7
[tableview,basetemplates,pagination] some views internally handle the pagination, in which case the base template should not try to paginate
web/views/basetemplates.py
web/views/navigation.py
web/views/tableview.py
--- a/web/views/basetemplates.py	Sat Oct 22 11:16:14 2011 +0200
+++ b/web/views/basetemplates.py	Mon Oct 24 08:55:07 2011 +0200
@@ -138,7 +138,7 @@
         if etypefilter and etypefilter.cw_propval('visible'):
             etypefilter.render(w=w)
         nav_html = UStringIO()
-        if view:
+        if view and not view.handle_pagination:
             view.paginate(w=nav_html.write)
         w(nav_html.getvalue())
         w(u'<div id="contentmain">\n')
--- a/web/views/navigation.py	Sat Oct 22 11:16:14 2011 +0200
+++ b/web/views/navigation.py	Mon Oct 24 08:55:07 2011 +0200
@@ -306,3 +306,4 @@
 from cubicweb.view import View
 View.do_paginate = do_paginate
 View.paginate = paginate
+View.handle_pagination = False
--- a/web/views/tableview.py	Sat Oct 22 11:16:14 2011 +0200
+++ b/web/views/tableview.py	Mon Oct 24 08:55:07 2011 +0200
@@ -416,6 +416,8 @@
     column_renderers = {}
     # default renderer class to use when no renderer specified for the column
     default_column_renderer_class = None
+    # default layout handles inner pagination
+    handle_pagination = True
 
     def call(self, **kwargs):
         self.layout_render(self.w)