Merge pull request #42 from eea/master

Comments do not retain Mark for Deletion state
This commit is contained in:
Alexandru Ghica 2014-02-04 02:15:24 -08:00
commit fe747f2ae9
3 changed files with 6 additions and 4 deletions

View File

@ -4,6 +4,9 @@ Changelog
2.3.0 (unreleased)
------------------
- Execute the property workflow
[omiron]
- Corrections and additions to the Danish translation
[aputtu]

View File

@ -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)

View File

@ -131,9 +131,8 @@ 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(