Mercurial > agora-palash
comparison comments/rawcomment.html @ 194:50ba20441122
Added comment template files and customized comments app files
author | ahsanalishahid <ahsan.ali.shahid@gmail.com> |
---|---|
date | Tue, 02 Jul 2013 02:04:09 +0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
193:fe51ec4eccc1 | 194:50ba20441122 |
---|---|
1 {% load comments %} | |
2 {% load mptt_tags %} | |
3 <div id = "comment"> | |
4 | |
5 | |
6 | |
7 {% if user.is_authenticated %} | |
8 | |
9 | |
10 {% render_comment_form for object %} | |
11 | |
12 {% get_comment_list for object as comments %} | |
13 | |
14 {% if comments %} | |
15 {% recursetree comments %} | |
16 <a name = "c{{ node.id }}"> </a> | |
17 <!-- {{ node.id }} --> | |
18 <div class = "comment-node"> | |
19 | |
20 <p class = "comment-bar"><a href = "{{ object.get_absolute_url }}#c{{ node.id }}"><strong>{{ node.user }} </strong> ยท {{ node.submit_date|timesince }} ago </a> </p> | |
21 <p class = "comment"><p class = "comment-body"> {{ node.comment }} </p> | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 {% render_comment_form for object %} | |
28 </div> | |
29 {# recursion tree logic #} | |
30 {% if not node.is_leaf_node %} | |
31 <div class = "comment-node-child"> | |
32 {{ children }} | |
33 </div> | |
34 {% endif %} | |
35 | |
36 {% endrecursetree %} | |
37 {% endif%} | |
38 | |
39 {% else %} | |
40 <h4>You need to be logged in to see comments</h4> | |
41 | |
42 {% endif%} | |
43 | |
44 </div> |