From f0cbc787ab03bae4eb792db267a6898141dc7a01 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Wed, 7 Oct 2009 20:07:55 +0000 Subject: [PATCH] has_replies function added to get only published comments for anon users. elro review fix. refs #9288 svn path=/plone.app.discussion/trunk/; revision=30252 --- plone/app/discussion/browser/comments.pt | 3 +- plone/app/discussion/browser/comments.py | 40 +++++++++++++++++++++--- 2 files changed, 37 insertions(+), 6 deletions(-) diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index c50950c..7c11b90 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -4,6 +4,7 @@ isAnon view/is_anonymous; canManage view/can_manage; replies python:view.get_replies(canManage); + has_replies python:view.has_replies(canManage); showCommenterImage view/show_commenter_image; errors options/state/getErrors|nothing; wtool context/@@plone_tools/workflow" @@ -132,7 +133,7 @@
+ tal:condition="python: isAnon and not isAnonymousDiscussionAllowed and has_replies">
0: if workflow_actions: return replies_with_workflow_actions() else: - return conversation.getThreads() + return published_replies() else: return None