diff --git a/templates/comments/tags/comment_item_tree.html b/templates/comments/tags/comment_item_tree.html new file mode 100644 index 0000000..676b792 --- /dev/null +++ b/templates/comments/tags/comment_item_tree.html @@ -0,0 +1,44 @@ +{% load blog_tags %} +
  • +
    + + + + +

    {{ comment_item.body |escape|custom_markdown }}

    + + +
    + +
  • +{% query article_comments parent_comment=comment_item as cc_comments %} +{% for cc in cc_comments %} + {% with comment_item=cc template_name="comments/tags/comment_item_tree.html" %} + {% with depth=depth|add:1 %} + {% include template_name %} + {% endwith %} + {% endwith %} +{% endfor %} \ No newline at end of file diff --git a/templates/comments/tags/comment_list.html b/templates/comments/tags/comment_list.html index 44a15a8..79d36c0 100644 --- a/templates/comments/tags/comment_list.html +++ b/templates/comments/tags/comment_list.html @@ -11,28 +11,16 @@ {% if article_comments %} {% cache 36000 article_comments article.id %}
    -
      {% query article_comments parent_comment=None as parent_comments %} - {% for comment in parent_comments %} - {% show_comment_item comment False %} - - {% parse_commenttree article_comments comment as childcomments %} - {% if childcomments %} - - {% endif %} - - + {% for comment_item in parent_comments %} + {% with 0 as depth %} + {% include "comments/tags/comment_item_tree.html" %} + {% endwith %} {% endfor %}
    -
    {% endcache %} {% endif %}