threaded view added to comments viewlet.
svn path=/plone.app.discussion/trunk/; revision=27140
This commit is contained in:
parent
72532517a6
commit
4769fbc2f7
@ -3,11 +3,13 @@
|
|||||||
i18n:domain="plone">
|
i18n:domain="plone">
|
||||||
|
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
<tal:getreplies repeat="reply_dict view/replies">
|
||||||
<tal:getreplies repeat="reply_dict replies">
|
|
||||||
|
|
||||||
<div class="comment"
|
<div class="comment"
|
||||||
tal:define="reply python:reply_dict[1]">
|
tal:define="reply reply_dict/comment;
|
||||||
|
depth reply_dict/depth|python:0;"
|
||||||
|
tal:attributes="class python:'comment replyTreeLevel'+str(depth);
|
||||||
|
style string:margin-left: ${depth}em;">
|
||||||
|
|
||||||
<h3>
|
<h3>
|
||||||
<a name="comments" tal:attributes="name reply/title">
|
<a name="comments" tal:attributes="name reply/title">
|
||||||
|
@ -34,8 +34,9 @@ class CommentsViewlet(BrowserView):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def replies(self):
|
def replies(self):
|
||||||
|
# Return all direct replies
|
||||||
conversation = conversationAdapterFactory(self.context)
|
conversation = conversationAdapterFactory(self.context)
|
||||||
return conversation.items()
|
return conversation.getThreads()
|
||||||
|
|
||||||
def format_time(self, time):
|
def format_time(self, time):
|
||||||
# TODO: to localized time not working!!!
|
# TODO: to localized time not working!!!
|
||||||
|
Loading…
Reference in New Issue
Block a user