fix docstring

This commit is contained in:
Katja Suess 2019-12-05 23:02:16 +01:00
parent 084d2893e7
commit 64d50fbd00
2 changed files with 12 additions and 14 deletions

View File

@ -11,7 +11,6 @@
<tal:main-macro metal:define-macro="main" <tal:main-macro metal:define-macro="main"
tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime; tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
items view/comments; items view/comments;
items_approved_or_rejected view/comments_approved;
filter view/filter|nothing; filter view/filter|nothing;
Batch python:modules['Products.CMFPlone'].Batch; Batch python:modules['Products.CMFPlone'].Batch;
b_size python:30; b_size python:30;

View File

@ -236,29 +236,28 @@ class DeleteOwnComment(DeleteComment):
class CommentTransition(BrowserView): class CommentTransition(BrowserView):
r"""Publish, reject, recall a comment or mark it as spam. 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/\ http://nohost/front-page/++conversation++default/1286289644723317/\
@@transmit-comment @@transmit-comment
Each table row (comment) in the moderation view contains a hidden input Each table row (comment) in the moderation view contains a hidden input
field with the absolute URL of the content object: field with the absolute URL of the content object:
<input type="hidden" <input type="hidden"
value="http://nohost/front-page/++conversation++default/\ value="http://nohost/front-page/++conversation++default/\
1286289644723317" 1286289644723317"
name="selected_obj_paths:list"> name="selected_obj_paths:list">
This absolute URL is called from a jQuery method that is bind to the 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 'delete' button of the table row. See javascripts/moderation.js for more
details. details.
""" """
def __call__(self): def __call__(self):
"""Call CommentTransition.""" """Call CommentTransition."""
comment = aq_inner(self.context) comment = aq_inner(self.context)
content_object = aq_parent(aq_parent(comment)) content_object = aq_parent(aq_parent(comment))
print("*** called: PublishComment for ", comment.Description)
workflowTool = getToolByName(comment, 'portal_workflow', None) workflowTool = getToolByName(comment, 'portal_workflow', None)
workflow_action = self.request.form.get('workflow_action', 'publish') workflow_action = self.request.form.get('workflow_action', 'publish')
review_state = workflowTool.getInfoFor(comment, 'review_state', '') review_state = workflowTool.getInfoFor(comment, 'review_state', '')