From a9d0cb574bb0939e61e2a1a4e2cafb92591997c1 Mon Sep 17 00:00:00 2001 From: Ovidiu Miron Date: Tue, 4 Feb 2014 11:00:06 +0200 Subject: [PATCH 01/10] Execute the property workflow --- plone/app/discussion/browser/javascripts/comments.js | 2 +- plone/app/discussion/browser/moderation.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/plone/app/discussion/browser/javascripts/comments.js b/plone/app/discussion/browser/javascripts/comments.js index 25accda..85f2e96 100644 --- a/plone/app/discussion/browser/javascripts/comments.js +++ b/plone/app/discussion/browser/javascripts/comments.js @@ -151,7 +151,7 @@ $.ajax({ type: "GET", url: form_url, - data: "workflow_action=publish", + data: data, context: trigger, success: function (msg) { // remove button (trigger object can't be directly removed) diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index aa7bb91..068cb60 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -131,12 +131,11 @@ class PublishComment(BrowserView): comment = aq_inner(self.context) content_object = aq_parent(aq_parent(comment)) workflowTool = getToolByName(comment, 'portal_workflow', None) - current_state = workflowTool.getInfoFor(comment, 'review_state') - if current_state != 'published': - workflowTool.doActionFor(comment, 'publish') + workflow_action = self.request.form.get('workflow_action', 'publish') + workflowTool.doActionFor(comment, workflow_action) comment.reindexObject() content_object.reindexObject() - IStatusMessage(self.context.REQUEST).addStatusMessage( + StatusMessage(self.context.REQUEST).addStatusMessage( _("Comment approved."), type="info") came_from = self.context.REQUEST.HTTP_REFERER From 6bc5db4276f9eff91e3728eaf322a635dd5cb17a Mon Sep 17 00:00:00 2001 From: Ovidiu Miron Date: Tue, 4 Feb 2014 11:46:29 +0200 Subject: [PATCH 02/10] Fixed typo error --- plone/app/discussion/browser/moderation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 068cb60..da710b1 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -135,7 +135,7 @@ class PublishComment(BrowserView): workflowTool.doActionFor(comment, workflow_action) comment.reindexObject() content_object.reindexObject() - StatusMessage(self.context.REQUEST).addStatusMessage( + IStatusMessage(self.context.REQUEST).addStatusMessage( _("Comment approved."), type="info") came_from = self.context.REQUEST.HTTP_REFERER From f660a6d9809624660ae2f165fdfdfb8d927b130f Mon Sep 17 00:00:00 2001 From: Ovidiu Miron Date: Tue, 4 Feb 2014 11:53:51 +0200 Subject: [PATCH 03/10] added to CHANGES.rst --- CHANGES.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 88650ce..d9fd126 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,6 +4,9 @@ Changelog 2.3.0 (unreleased) ------------------ +- Execute the property workflow + [omiron] + - Corrections and additions to the Danish translation [aputtu] From aa8730228034a8eeaf38e7703de3c6fa90328280 Mon Sep 17 00:00:00 2001 From: ichim-david Date: Mon, 10 Feb 2014 11:51:35 +0200 Subject: [PATCH 04/10] Amend commit history of changes made by omiron from pull request 42 for a clearer message of intended fix --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index d9fd126..8d8c764 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 2.3.0 (unreleased) ------------------ -- Execute the property workflow +- Execute the proper workflow change when using the moderation buttons instead + of hardcoding the workflow action to always publish [omiron] - Corrections and additions to the Danish translation From d788d07a879604bf6e01932d4b538316eeb7c4d2 Mon Sep 17 00:00:00 2001 From: Philip Bauer Date: Fri, 14 Feb 2014 09:40:55 +0100 Subject: [PATCH 05/10] fix test. the richtext-field in plone.app.contenttypes uses a behavior --- plone/app/discussion/tests/functional_test_comments.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plone/app/discussion/tests/functional_test_comments.txt b/plone/app/discussion/tests/functional_test_comments.txt index 736da64..55a489d 100644 --- a/plone/app/discussion/tests/functional_test_comments.txt +++ b/plone/app/discussion/tests/functional_test_comments.txt @@ -299,7 +299,7 @@ Login as admin. Edit the content object. >>> browser.open("http://nohost/plone/doc1/edit") - >>> browser.getControl(name='form.widgets.text').value = "Lorem ipsum" + >>> browser.getControl(name='form.widgets.IRichText.text').value = "Lorem ipsum" >>> browser.getControl('Save').click() Make sure the edit was successful. From ce5c00ca7ddf602b6d22932b8e95cd8e5e66e199 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 22 Feb 2014 07:25:07 +0100 Subject: [PATCH 06/10] Prepare 2.3.0 release. --- CHANGES.rst | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 8d8c764..319e236 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ Changelog ========= -2.3.0 (unreleased) +2.3.0 (2014-02-22) ------------------ - Execute the proper workflow change when using the moderation buttons instead diff --git a/setup.py b/setup.py index af74549..73597bc 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '2.3.0dev' +version = '2.3.0' install_requires = [ 'setuptools', From cd65923df53925a941b5d3d47f7f5258bf29d7f4 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 22 Feb 2014 07:58:35 +0100 Subject: [PATCH 07/10] Make sure a release includes *.rst files. --- MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/MANIFEST.in b/MANIFEST.in index e0cdcf4..f3e0bd5 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ include *.txt +include *.rst recursive-include docs * recursive-include plone * From 7a8f60dd5f18bceb12fd887a130f24aba0428212 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 22 Feb 2014 10:11:05 +0100 Subject: [PATCH 08/10] Back to development: 2.3.1 --- CHANGES.rst | 6 ++++++ setup.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 319e236..25150f9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog ========= +2.3.1 (unreleased) +------------------ + +- Nothing changed yet. + + 2.3.0 (2014-02-22) ------------------ diff --git a/setup.py b/setup.py index 73597bc..fe1ab01 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '2.3.0' +version = '2.3.1.dev0' install_requires = [ 'setuptools', From a26a4b363c63b715c03bd344d0deb4c5790ae861 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 22 Feb 2014 10:12:15 +0100 Subject: [PATCH 09/10] 2.3.0 was a brown bag release. --- CHANGES.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.rst b/CHANGES.rst index 25150f9..dec4a56 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,7 +4,8 @@ Changelog 2.3.1 (unreleased) ------------------ -- Nothing changed yet. +- 2.3.0 was a brown bag release. + [timo] 2.3.0 (2014-02-22) From e0ae1c0eaacea9ca4cada32b5118c83fe51aa46c Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sat, 22 Feb 2014 10:12:32 +0100 Subject: [PATCH 10/10] Preparing release 2.3.1 --- CHANGES.rst | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index dec4a56..b01b0d9 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,7 +1,7 @@ Changelog ========= -2.3.1 (unreleased) +2.3.1 (2014-02-22) ------------------ - 2.3.0 was a brown bag release. diff --git a/setup.py b/setup.py index fe1ab01..8385504 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '2.3.1.dev0' +version = '2.3.1' install_requires = [ 'setuptools',