show the second "login to comment"-button (below the comments) only when there are replies.
svn path=/plone.app.discussion/trunk/; revision=27198
This commit is contained in:
parent
aa50c33d8d
commit
49aab7389b
@ -86,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="reply"
|
<div class="reply"
|
||||||
tal:condition="isAnon">
|
tal:condition="python: isAnon and replies">
|
||||||
<form tal:attributes="action view/login_action">
|
<form tal:attributes="action view/login_action">
|
||||||
<input class="standalone"
|
<input class="standalone"
|
||||||
style="margin-bottom: 1.25em;"
|
style="margin-bottom: 1.25em;"
|
||||||
|
@ -61,7 +61,11 @@ class CommentsViewlet(ViewletBase):
|
|||||||
def get_replies(self):
|
def get_replies(self):
|
||||||
# Return all direct replies
|
# Return all direct replies
|
||||||
conversation = conversationAdapterFactory(self.context)
|
conversation = conversationAdapterFactory(self.context)
|
||||||
|
|
||||||
|
if conversation.total_comments > 0:
|
||||||
return conversation.getThreads()
|
return conversation.getThreads()
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def is_anonymous(self):
|
def is_anonymous(self):
|
||||||
return self.portal_state.anonymous()
|
return self.portal_state.anonymous()
|
||||||
|
Loading…
Reference in New Issue
Block a user