Comment posting support.
[zzz-floof.git] / floof / templates / comments / lib.mako
diff --git a/floof/templates/comments/lib.mako b/floof/templates/comments/lib.mako
new file mode 100644 (file)
index 0000000..df5cbf6
--- /dev/null
@@ -0,0 +1,15 @@
+<%def name="comment_block(comments)">
+<p><a href="${url(controller='comments', action='thread', owner_url=h.get_comment_owner_url(**c.route))}">View all</a></p>
+<p><a href="${url(controller='comments', action='reply', owner_url=h.get_comment_owner_url(**c.route))}">Reply</a></p>
+${comment_thread(comments)}
+</%def>
+
+<%def name="comment_thread(comments)">
+% for comment in comments:
+<div class="comment">
+    <div class="user">${comment.user.name}</div>
+    <div class="time">${comment.time}</div>
+    <p>${comment.text}</p>
+</div>
+% endfor
+</%def>