/
comment_list.html
41 lines (38 loc) · 1.35 KB
/
comment_list.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
{% load lifeflow %}
<div class="comments" id="comments">
{% with object.pub_date as date %}
<div class="comments-subscribe">
<span><a href="/feeds/entry_comment/{{ date.year }}/{{ date.month }}/{{ date.day }}/{{ object.slug }}/">Subscribe to comments on {{ object.title }}</a></span>
</div>
{% endwith %}
{% for comment_tuple in object.organize_comments %}
{% with comment_tuple.0 as comment %}
{% with comment_tuple.1 as depth %}
<div class="comment">
<div class="comment_{{ depth|boundary:"4" }}" id="comment_{{ comment.pk }}">
{% if comment.webpage %}
<span class="comment-author">
<a href="{{ comment.webpage }}">{{ comment.name }}</a>
</span>
{% else %}
<span class="comment-author">
{{ comment.name }}
</span>
{% endif %}
<span class="comment-reply"><a href="/comments/create/{{ object.pk }}/{{ comment.pk }}/"> reply </a></span>
{% if comment.parent %}
<span class="comment-parent-link">
Responding to <a href="#comment_{{ comment.parent.pk }}">{{ comment.parent.name }}</a>
</span>
{% endif %}
<br />
<div class="comment-body">
{{ comment.html|safe }}
</div>
</div>
</div>
{% endwith %}
{% endwith %}
{% endfor %}
<h3 class="reply"><a href="/comments/create/{{ object.pk }}/"> Reply to this entry </a></h3>
</div>