1 <%def name="comment_block(comments)">
2 <h1>${len(comments)} comments</h1>
3 <p><a href="${url(controller='comments', action='thread', owner_url=h.get_comment_owner_url(**c.route))}">View all</a></p>
4 <p><a href="${url(controller='comments', action='reply', owner_url=h.get_comment_owner_url(**c.route))}">Reply</a></p>
5 ${comment_thread(comments)}
8 <%def name="comment_thread(comments)">
9 <%! from floof.model.comments import indent_comments %>\
10 % for comment in indent_comments(comments):
11 ${single_comment(comment)}
15 <%def name="single_comment(comment)">
16 <div class="comment" style="margin-left: ${comment.indent}em;">
18 <div class="user">${comment.user.name}</div>
19 <div class="time">${comment.time}</div>
20 <div class="link"><a href="${url(controller='comments', action='thread', id=comment.id, owner_url=h.get_comment_owner_url(**c.route))}">Link</a></div>
22 <p>${comment.text}</p>