Skip to content

Commit

Permalink
[fc] Repository: plone.batching
Browse files Browse the repository at this point in the history
Branch: refs/heads/1.1.x
Date: 2021-03-01T15:41:42+01:00
Author: Peter Holzer (agitator) <peter.holzer@agitator.com>
Commit: plone/plone.batching@db3d656

cherry pick changes from plone/plone.batching#26

Files changed:
A news/26.feature
M plone/batching/browser.py
Repository: plone.batching

Branch: refs/heads/1.1.x
Date: 2021-03-02T11:25:29+01:00
Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl>
Commit: plone/plone.batching@9f2b54b

Merge pull request #29 from plone/1.1.x-req-params-from-parent-req

cherry pick changes from plone/plone.batching#26

Files changed:
A news/26.feature
M plone/batching/browser.py
  • Loading branch information
mauritsvanrees committed Mar 2, 2021
1 parent 591b83b commit 1a6db2a
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,34 @@
Repository: Products.CMFPlone
Repository: plone.batching


Branch: refs/heads/5.2.x
Date: 2021-03-02T00:48:22+01:00
Author: Maurits van Rees (mauritsvanrees) <maurits@vanrees.org>
Commit: https://github.com/plone/Products.CMFPlone/commit/0792f5cb92ea071bd40b819db6901d8b5df49512
Branch: refs/heads/1.1.x
Date: 2021-03-01T15:41:42+01:00
Author: Peter Holzer (agitator) <peter.holzer@agitator.com>
Commit: https://github.com/plone/plone.batching/commit/db3d6567f6f8cf438b90a33c1907ccedfd5177c3

Updated metadata.xml version to 5212.
cherry pick changes from https://github.com/plone/plone.batching/pull/26

Files changed:
M Products/CMFPlone/profiles/default/metadata.xml
A news/26.feature
M plone/batching/browser.py

b'diff --git a/Products/CMFPlone/profiles/default/metadata.xml b/Products/CMFPlone/profiles/default/metadata.xml\nindex fb07ef53c5..b5ffae894d 100644\n--- a/Products/CMFPlone/profiles/default/metadata.xml\n+++ b/Products/CMFPlone/profiles/default/metadata.xml\n@@ -1,4 +1,4 @@\n <?xml version="1.0"?>\n <metadata>\n- <version>5211</version>\n+ <version>5212</version>\n </metadata>\n'
b'diff --git a/news/26.feature b/news/26.feature\nnew file mode 100644\nindex 0000000..f1b7f68\n--- /dev/null\n+++ b/news/26.feature\n@@ -0,0 +1,2 @@\n+Include request form parameters from parent request to allow batching in plone.app.standardtiles and filtering with collective.collectionfilter.\n+[agitator]\n\\ No newline at end of file\ndiff --git a/plone/batching/browser.py b/plone/batching/browser.py\nindex 333faf2..a6fb418 100644\n--- a/plone/batching/browser.py\n+++ b/plone/batching/browser.py\n@@ -39,7 +39,11 @@ class BootstrapBatchView(BatchView):\n class PloneBatchView(BatchView):\n \n def make_link(self, pagenumber=None, omit_params=[\'ajax_load\']):\n+ # Include request form parameters from parent request\n query_params = {}\n+ if "PARENT_REQUEST" in self.request:\n+ query_params.update(self.request["PARENT_REQUEST"].form)\n+ # update/override parent params with actual request params\n query_params.update(self.request.form)\n if self.batchformkeys:\n for key in list(query_params.keys()):\n@@ -52,12 +56,10 @@ def make_link(self, pagenumber=None, omit_params=[\'ajax_load\']):\n \n start = max(pagenumber - 1, 0) * self.batch.pagesize\n query_params[self.batch.b_start_str] = start\n- url = u\'{0}?{1}\'.format(\n- self.request.ACTUAL_URL,\n- make_query(query_params)\n- )\n+ url = u"{0}?{1}".format(self.request.ACTUAL_URL, make_query(query_params))\n return url\n \n \n+\n class PloneBootstrapBatchView(BootstrapBatchView, PloneBatchView):\n pass\n'

Repository: plone.batching


Branch: refs/heads/1.1.x
Date: 2021-03-02T11:25:29+01:00
Author: Maurits van Rees (mauritsvanrees) <m.van.rees@zestsoftware.nl>
Commit: https://github.com/plone/plone.batching/commit/9f2b54ba711a7177644a7370ad01419b00041eea

Merge pull request #29 from plone/1.1.x-req-params-from-parent-req

cherry pick changes from https://github.com/plone/plone.batching/pull/26

Files changed:
A news/26.feature
M plone/batching/browser.py

b'diff --git a/news/26.feature b/news/26.feature\nnew file mode 100644\nindex 0000000..f1b7f68\n--- /dev/null\n+++ b/news/26.feature\n@@ -0,0 +1,2 @@\n+Include request form parameters from parent request to allow batching in plone.app.standardtiles and filtering with collective.collectionfilter.\n+[agitator]\n\\ No newline at end of file\ndiff --git a/plone/batching/browser.py b/plone/batching/browser.py\nindex 333faf2..a6fb418 100644\n--- a/plone/batching/browser.py\n+++ b/plone/batching/browser.py\n@@ -39,7 +39,11 @@ class BootstrapBatchView(BatchView):\n class PloneBatchView(BatchView):\n \n def make_link(self, pagenumber=None, omit_params=[\'ajax_load\']):\n+ # Include request form parameters from parent request\n query_params = {}\n+ if "PARENT_REQUEST" in self.request:\n+ query_params.update(self.request["PARENT_REQUEST"].form)\n+ # update/override parent params with actual request params\n query_params.update(self.request.form)\n if self.batchformkeys:\n for key in list(query_params.keys()):\n@@ -52,12 +56,10 @@ def make_link(self, pagenumber=None, omit_params=[\'ajax_load\']):\n \n start = max(pagenumber - 1, 0) * self.batch.pagesize\n query_params[self.batch.b_start_str] = start\n- url = u\'{0}?{1}\'.format(\n- self.request.ACTUAL_URL,\n- make_query(query_params)\n- )\n+ url = u"{0}?{1}".format(self.request.ACTUAL_URL, make_query(query_params))\n return url\n \n \n+\n class PloneBootstrapBatchView(BootstrapBatchView, PloneBatchView):\n pass\n'

0 comments on commit 1a6db2a

Please sign in to comment.