Skip to content

Commit

Permalink
fix docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Jan 8, 2020
1 parent 084d289 commit 64d50fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion plone/app/discussion/browser/moderation.pt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<tal:main-macro metal:define-macro="main"
tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
items view/comments;
items_approved_or_rejected view/comments_approved;
filter view/filter|nothing;
Batch python:modules['Products.CMFPlone'].Batch;
b_size python:30;
Expand Down
25 changes: 12 additions & 13 deletions plone/app/discussion/browser/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,29 +236,28 @@ def __call__(self):
class CommentTransition(BrowserView):
r"""Publish, reject, recall a comment or mark it as spam.
This view is always called directly on the comment object:
This view is always called directly on the comment object:
http://nohost/front-page/++conversation++default/1286289644723317/\
@@transmit-comment
http://nohost/front-page/++conversation++default/1286289644723317/\
@@transmit-comment
Each table row (comment) in the moderation view contains a hidden input
field with the absolute URL of the content object:
Each table row (comment) in the moderation view contains a hidden input
field with the absolute URL of the content object:
<input type="hidden"
value="http://nohost/front-page/++conversation++default/\
1286289644723317"
name="selected_obj_paths:list">
<input type="hidden"
value="http://nohost/front-page/++conversation++default/\
1286289644723317"
name="selected_obj_paths:list">
This absolute URL is called from a jQuery method that is bind to the
'delete' button of the table row. See javascripts/moderation.js for more
details.
This absolute URL is called from a jQuery method that is bind to the
'delete' button of the table row. See javascripts/moderation.js for more
details.
"""

def __call__(self):
"""Call CommentTransition."""
comment = aq_inner(self.context)
content_object = aq_parent(aq_parent(comment))
print("*** called: PublishComment for ", comment.Description)
workflowTool = getToolByName(comment, 'portal_workflow', None)
workflow_action = self.request.form.get('workflow_action', 'publish')
review_state = workflowTool.getInfoFor(comment, 'review_state', '')
Expand Down

0 comments on commit 64d50fb

Please sign in to comment.