diff --git a/devplacepy/templates/_comment.html b/devplacepy/templates/_comment.html new file mode 100644 index 0000000..5b4cbe6 --- /dev/null +++ b/devplacepy/templates/_comment.html @@ -0,0 +1,46 @@ +{% macro render_comment(item, depth=0) %} +
+
+
+ + +
+ {{ item.votes.up - item.votes.down }} +
+ + +
+
+ +
+
+ + {{ item.author['username'] if item.author else '?' }} + + {% set _user = item.author %}{% set _class = "comment-author" %}{% include "_user_link.html" %} + {{ item.time_ago }} +
+
{{ item.comment['content'] }}
+ {% set attachments = item.get('attachments', []) %} + {% if attachments %} + {% include "_attachment_display.html" %} + {% endif %} +
+ + {% if user and item.comment['user_uid'] == user['uid'] %} +
+ +
+ {% endif %} +
+ + {% if item.children %} +
+ {% for child in item.children %} + {{ render_comment(child, depth + 1) }} + {% endfor %} +
+ {% endif %} +
+
+{% endmacro %}