This commit is contained in:
Timo Stollenwerk 2012-01-13 10:16:01 +01:00
parent bbc70ede54
commit 07cde3ca7b
1 changed files with 38 additions and 35 deletions

View File

@ -39,7 +39,8 @@ class View(BrowserView):
"""
context = aq_inner(self.context)
workflowTool = getToolByName(context, 'portal_workflow')
comment_workflow = workflowTool.getChainForPortalType('Discussion Item')
comment_workflow = workflowTool.getChainForPortalType(
'Discussion Item')
if comment_workflow:
comment_workflow = comment_workflow[0]
comment_workflow = workflowTool[comment_workflow]
@ -57,7 +58,8 @@ class ModerateCommentsEnabled(BrowserView):
"""
context = aq_inner(self.context)
workflowTool = getToolByName(context, 'portal_workflow', None)
comment_workflow = workflowTool.getChainForPortalType('Discussion Item')
comment_workflow = workflowTool.getChainForPortalType(
'Discussion Item')
if comment_workflow:
comment_workflow = comment_workflow[0]
comment_workflow = workflowTool[comment_workflow]
@ -140,6 +142,7 @@ class PublishComment(BrowserView):
came_from = content_object.absolute_url()
return self.context.REQUEST.RESPONSE.redirect(came_from)
class BulkActionsView(BrowserView):
"""Bulk actions (unapprove, approve, delete, mark as spam).