0001-misc-add-default-page-size-site-options-for-backoffi.patch
wcs/admin/users.py | ||
---|---|---|
306 | 306 |
html_top('users', title = _('Users')) |
307 | 307 |
r = TemplateIO(html=True) |
308 | 308 | |
309 |
limit = int(get_request().form.get('limit', 20)) |
|
309 |
limit = get_request().form.get('limit', |
|
310 |
int(get_publisher().get_site_option('default-page-size') or 20)) |
|
310 | 311 |
offset = int(get_request().form.get('offset', 0)) |
311 | 312 | |
312 | 313 |
ident_methods = get_cfg('identification', {}).get('methods', []) |
wcs/backoffice/management.py | ||
---|---|---|
536 | 536 |
if get_publisher().is_using_postgresql(): |
537 | 537 |
# only enable pagination in SQL mode, as we do not have sorting in |
538 | 538 |
# the other case. |
539 |
limit = get_request().form.get('limit', 20) |
|
539 |
limit = get_request().form.get('limit', |
|
540 |
int(get_publisher().get_site_option('default-page-size') or 20)) |
|
540 | 541 |
else: |
541 | 542 |
limit = get_request().form.get('limit', 0) |
542 | 543 |
offset = get_request().form.get('offset', 0) |
wcs/forms/backoffice.py | ||
---|---|---|
33 | 33 | |
34 | 34 |
if not items: |
35 | 35 |
if offset and not limit: |
36 |
limit = 20
|
|
36 |
limit = int(get_publisher().get_site_option('default-page-size') or 20)
|
|
37 | 37 |
items, total_count = self.get_listing_items( |
38 | 38 |
selected_filter, offset, limit, query, order_by, |
39 | 39 |
criterias=criterias) |
40 |
- |