threaded view added to comments viewlet.

svn path=/plone.app.discussion/trunk/; revision=27140
This commit is contained in:
Timo Stollenwerk 2009-05-27 06:58:00 +00:00
parent 72532517a6
commit 4769fbc2f7
2 changed files with 7 additions and 4 deletions

View File

@ -3,11 +3,13 @@
i18n:domain="plone">
<div class="discussion">
<tal:getreplies repeat="reply_dict replies">
<tal:getreplies repeat="reply_dict view/replies">
<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>
<a name="comments" tal:attributes="name reply/title">

View File

@ -34,8 +34,9 @@ class CommentsViewlet(BrowserView):
pass
def replies(self):
# Return all direct replies
conversation = conversationAdapterFactory(self.context)
return conversation.items()
return conversation.getThreads()
def format_time(self, time):
# TODO: to localized time not working!!!