X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/c68928f2fc57638134bae50fe4ff5b1e979bb198..b0ad3cb49cc07e32a24cc0119a05c7faf245ae19:/floof/templates/comments/lib.mako?ds=sidebyside diff --git a/floof/templates/comments/lib.mako b/floof/templates/comments/lib.mako index 38e6534..93fe086 100644 --- a/floof/templates/comments/lib.mako +++ b/floof/templates/comments/lib.mako @@ -1,17 +1,34 @@ <%def name="comment_block(comments)"> -

${len(comments)} comments

-## XXX make sure these do the right thing when this is a subtree +

${len(comments)} comment${'' if len(comments) == 1 else 's'}

View all

Reply

${comment_thread(comments)} <%def name="comment_thread(comments)"> -% for comment in comments: +<%! from floof.model.comments import indent_comments %>\ +% for comment in indent_comments(comments): +${single_comment(comment)} +% endfor + + +<%def name="single_comment(comment)"> +% if hasattr(comment, 'indent'): +
+% else:
-
${comment.user.name}
-
${comment.time}
+% endif +
+
${comment.user.name}
+
${comment.time}
+ +

${comment.text}

-% endfor