12 |
12 |
13 from logilab.common.deprecation import class_renamed |
13 from logilab.common.deprecation import class_renamed |
14 from logilab.mtconverter import xml_escape |
14 from logilab.mtconverter import xml_escape |
15 |
15 |
16 from cubicweb import role |
16 from cubicweb import role |
17 from cubicweb.utils import merge_dicts |
|
18 from cubicweb.view import Component |
17 from cubicweb.view import Component |
19 from cubicweb.selectors import ( |
18 from cubicweb.selectors import ( |
20 paginated_rset, one_line_rset, primary_view, match_context_prop, |
19 paginated_rset, one_line_rset, primary_view, match_context_prop, |
21 partial_has_related_entities) |
20 partial_has_related_entities) |
22 |
21 |
114 del params[self.start_param] |
113 del params[self.start_param] |
115 if self.stop_param in params: |
114 if self.stop_param in params: |
116 del params[self.stop_param] |
115 del params[self.stop_param] |
117 |
116 |
118 def page_url(self, path, params, start, stop): |
117 def page_url(self, path, params, start, stop): |
119 params = merge_dicts(params, {self.start_param : start, |
118 params = dict(params) |
120 self.stop_param : stop,}) |
119 params.update({self.start_param : start, |
|
120 self.stop_param : stop,}) |
121 if path == 'json': |
121 if path == 'json': |
122 rql = params.pop('rql', self.cw_rset.printable_rql()) |
122 rql = params.pop('rql', self.cw_rset.printable_rql()) |
123 # latest 'true' used for 'swap' mode |
123 # latest 'true' used for 'swap' mode |
124 url = 'javascript: replacePageChunk(%s, %s, %s, %s, true)' % ( |
124 url = 'javascript: replacePageChunk(%s, %s, %s, %s, true)' % ( |
125 dumps(params.get('divid', 'paginated-content')), |
125 dumps(params.get('divid', 'paginated-content')), |