view 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
line wrap: on
line source

{% load comments %}
{% load mptt_tags %}
<div id = "comment">



{% if user.is_authenticated %}


{% render_comment_form for object %}

{% get_comment_list for object as comments %}

{% if comments %}
{% recursetree comments %}
  <a name = "c{{ node.id }}"> </a>
 <!-- {{ node.id }} -->
  <div class = "comment-node">

 <p class = "comment-bar"><a href = "{{ object.get_absolute_url }}#c{{ node.id }}"><strong>{{ node.user }} </strong>  ยท    {{ node.submit_date|timesince }}  ago  </a> </p>
  <p class = "comment"><p class = "comment-body"> {{ node.comment }} </p>
  




  {% render_comment_form for object %}
</div>
  {# recursion tree logic #}
  {% if not node.is_leaf_node %}
  <div class = "comment-node-child">
  {{ children }}
</div>
  {% endif %}

{% endrecursetree %}
{% endif%}

{% else %}
    <h4>You need to be logged in to see comments</h4>

{% endif%}

</div>