equal
deleted
inserted
replaced
220 |
220 |
221 def paginate(view, show_all_option=True, w=None, page_size=None, rset=None): |
221 def paginate(view, show_all_option=True, w=None, page_size=None, rset=None): |
222 """paginate results if the view is paginable and we're not explictly told to |
222 """paginate results if the view is paginable and we're not explictly told to |
223 display everything (by setting __force_display in req.form) |
223 display everything (by setting __force_display in req.form) |
224 """ |
224 """ |
225 if not (view.paginable or view._cw.form.get('__force_display')): |
225 if view.paginable ant not view._cw.form.get('__force_display'): |
226 do_paginate(view, rset, w or view.w, show_all_option, page_size) |
226 do_paginate(view, rset, w or view.w, show_all_option, page_size) |
227 |
227 |
228 # monkey patch base View class to add a .paginate([...]) |
228 # monkey patch base View class to add a .paginate([...]) |
229 # method to be called to write pages index in the view and then limit the result |
229 # method to be called to write pages index in the view and then limit the result |
230 # set to the current page |
230 # set to the current page |