Skip to content

Commit

Permalink
[fc] Repository: plone.app.content
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2018-10-04T17:43:25+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: plone/plone.app.content@1eb6237

Replaced usages of my_worklist.py skin script
which is going to be removed.

Files changed:
M CHANGES.rst
M plone/app/content/browser/reviewlist.py
Repository: plone.app.content

Branch: refs/heads/master
Date: 2018-10-05T14:45:07+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: plone/plone.app.content@f8a0ba4

Merge pull request #168 from plone/1801-remove-my-worklist

Replaced usages of my_worklist.py skin script

Files changed:
M CHANGES.rst
M plone/app/content/browser/reviewlist.py
  • Loading branch information
jensens committed Oct 5, 2018
1 parent d7f7c19 commit afb8eeb
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
Repository: Products.CMFPlacefulWorkflow
Repository: plone.app.content


Branch: refs/heads/master
Date: 2018-10-04T17:51:35+02:00
Date: 2018-10-04T17:43:25+02:00
Author: Manuel Reinhardt (reinhardt) <reinhardt@syslab.com>
Commit: https://github.com/plone/Products.CMFPlacefulWorkflow/commit/ee0ded6da45bb86cf48f4d0fdff51eb656650445
Commit: https://github.com/plone/plone.app.content/commit/1eb6237845e41f8b2b522d74b237cf5f89c3f653

Replaced usages of my_worklist.py skin script
which is going to be removed.

Files changed:
A news/28.feature
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M CHANGES.rst
M plone/app/content/browser/reviewlist.py

b"diff --git a/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py b/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\nindex acaba08..fb4b029 100644\n--- a/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\n+++ b/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\n@@ -623,6 +623,6 @@ def test_16_getWorklists(self):\n 'plone_workflow',\n 'simple_publication_workflow',\n )))\n- self.assertEqual(tuple(self.portal.my_worklist()), (document, ))\n+ self.assertEqual(tuple(wf_tool.getWorklistsResults()), (document, ))\n \n logout()\ndiff --git a/news/28.feature b/news/28.feature\nnew file mode 100644\nindex 0000000..4c8f3fc\n--- /dev/null\n+++ b/news/28.feature\n@@ -0,0 +1 @@\n+Replaced usages of my_worklist.py skin script.\n"
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex c8ad3ab..d5d14a2 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -10,6 +10,9 @@ Breaking changes:\n \n New features:\n \n+- Replaced usages of my_worklist.py skin script.\n+ https://github.com/plone/Products.CMFPlone/issues/1801\n+ [reinhardt]\n - Use obj.get_size() instead of getObjSize skin script.\n Allows removing the script and also returns a numerical value.\n #1801\ndiff --git a/plone/app/content/browser/reviewlist.py b/plone/app/content/browser/reviewlist.py\nindex 84db314..f3ae032 100644\n--- a/plone/app/content/browser/reviewlist.py\n+++ b/plone/app/content/browser/reviewlist.py\n@@ -17,7 +17,12 @@\n class FullReviewListView(BrowserView):\n \n def revlist(self):\n- return self.context.my_worklist()\n+ portal_membership = getToolByName(self.context, \'portal_membership\')\n+ portal_workflow = getToolByName(self.context, \'portal_workflow\')\n+ if portal_membership.isAnonymousUser():\n+ return []\n+\n+ return portal_workflow.getWorklistsResults()\n \n def url(self):\n return self.context.absolute_url() + \'/full_review_list\'\n@@ -54,6 +59,7 @@ def items(self):\n name=u\'plone_layout\')\n portal_workflow = getToolByName(self.context, \'portal_workflow\')\n portal_types = getToolByName(self.context, \'portal_types\')\n+ portal_membership = getToolByName(self.context, \'portal_membership\')\n \n registry = getUtility(IRegistry)\n use_view_action = registry.get(\n@@ -62,7 +68,12 @@ def items(self):\n browser_default = plone_utils.browserDefault(self.context)\n \n results = list()\n- for i, obj in enumerate(self.context.my_worklist()):\n+ if portal_membership.isAnonymousUser():\n+ worklist = []\n+ else:\n+ worklist = portal_workflow.getWorklistsResults()\n+\n+ for i, obj in enumerate(worklist):\n if i % 2 == 0:\n table_row_class = "even"\n else:\n'

Repository: Products.CMFPlacefulWorkflow
Repository: plone.app.content


Branch: refs/heads/master
Date: 2018-10-05T14:45:00+02:00
Date: 2018-10-05T14:45:07+02:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/Products.CMFPlacefulWorkflow/commit/50542da0fbe02406d76350fed799069256b37d1c
Commit: https://github.com/plone/plone.app.content/commit/f8a0ba4cb9d9e074fb4970f908a53b12ba00d258

Merge pull request #29 from plone/1801-remove-my-worklist
Merge pull request #168 from plone/1801-remove-my-worklist

Replaced usages of my_worklist.py skin script

Files changed:
A news/28.feature
M Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py
M CHANGES.rst
M plone/app/content/browser/reviewlist.py

b"diff --git a/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py b/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\nindex acaba08..fb4b029 100644\n--- a/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\n+++ b/Products/CMFPlacefulWorkflow/tests/testCMFPlacefulWorkflow.py\n@@ -623,6 +623,6 @@ def test_16_getWorklists(self):\n 'plone_workflow',\n 'simple_publication_workflow',\n )))\n- self.assertEqual(tuple(self.portal.my_worklist()), (document, ))\n+ self.assertEqual(tuple(wf_tool.getWorklistsResults()), (document, ))\n \n logout()\ndiff --git a/news/28.feature b/news/28.feature\nnew file mode 100644\nindex 0000000..4c8f3fc\n--- /dev/null\n+++ b/news/28.feature\n@@ -0,0 +1 @@\n+Replaced usages of my_worklist.py skin script.\n"
b'diff --git a/CHANGES.rst b/CHANGES.rst\nindex c8ad3ab..d5d14a2 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -10,6 +10,9 @@ Breaking changes:\n \n New features:\n \n+- Replaced usages of my_worklist.py skin script.\n+ https://github.com/plone/Products.CMFPlone/issues/1801\n+ [reinhardt]\n - Use obj.get_size() instead of getObjSize skin script.\n Allows removing the script and also returns a numerical value.\n #1801\ndiff --git a/plone/app/content/browser/reviewlist.py b/plone/app/content/browser/reviewlist.py\nindex 84db314..f3ae032 100644\n--- a/plone/app/content/browser/reviewlist.py\n+++ b/plone/app/content/browser/reviewlist.py\n@@ -17,7 +17,12 @@\n class FullReviewListView(BrowserView):\n \n def revlist(self):\n- return self.context.my_worklist()\n+ portal_membership = getToolByName(self.context, \'portal_membership\')\n+ portal_workflow = getToolByName(self.context, \'portal_workflow\')\n+ if portal_membership.isAnonymousUser():\n+ return []\n+\n+ return portal_workflow.getWorklistsResults()\n \n def url(self):\n return self.context.absolute_url() + \'/full_review_list\'\n@@ -54,6 +59,7 @@ def items(self):\n name=u\'plone_layout\')\n portal_workflow = getToolByName(self.context, \'portal_workflow\')\n portal_types = getToolByName(self.context, \'portal_types\')\n+ portal_membership = getToolByName(self.context, \'portal_membership\')\n \n registry = getUtility(IRegistry)\n use_view_action = registry.get(\n@@ -62,7 +68,12 @@ def items(self):\n browser_default = plone_utils.browserDefault(self.context)\n \n results = list()\n- for i, obj in enumerate(self.context.my_worklist()):\n+ if portal_membership.isAnonymousUser():\n+ worklist = []\n+ else:\n+ worklist = portal_workflow.getWorklistsResults()\n+\n+ for i, obj in enumerate(worklist):\n if i % 2 == 0:\n table_row_class = "even"\n else:\n'

0 comments on commit afb8eeb

Please sign in to comment.