Added partial support for comment threading.
[zzz-floof.git] / floof / templates / comments / lib.mako
1 <%def name="comment_block(comments)">
2 <h1>${len(comments)} comments</h1>
3 ## XXX make sure these do the right thing when this is a subtree
4 <p><a href="${url(controller='comments', action='thread', owner_url=h.get_comment_owner_url(**c.route))}">View all</a></p>
5 <p><a href="${url(controller='comments', action='reply', owner_url=h.get_comment_owner_url(**c.route))}">Reply</a></p>
6 ${comment_thread(comments)}
7 </%def>
8
9 <%def name="comment_thread(comments)">
10 % for comment in comments:
11 <div class="comment">
12     <div class="user">${comment.user.name}</div>
13     <div class="time">${comment.time}</div>
14     <p>${comment.text}</p>
15 </div>
16 % endfor
17 </%def>