{% load i18n humanize dg_core dg_wiki %}{% comment %} The comments on a page, oldest first, each with its replies, and the box for the next one; with who watches. {% endcomment %}

{% translate "Comments" %}

{% csrf_token %} {% if request.user in watchers %} {% else %} {% endif %}

{% if watchers %}{% translate "Watching:" %} {% for user in watchers %}{{ user|person_name }}{% if not forloop.last %}, {% endif %}{% endfor %}.{% endif %} {% translate "Watchers hear about new comments. Mention someone with @ to tell them." %}

{% for comment in comments %}
{% include 'dg_wiki/_comment_head.html' with item=comment %}
{{ comment.body|wiki_markdown:page }}
{% translate "Reply" %}
{% csrf_token %}
{% if comment.author == request.user %}{% include 'dg_wiki/_comment_edit.html' with item=comment %}{% endif %}
{% for reply in comment.replies.all %}
{% include 'dg_wiki/_comment_head.html' with item=reply %}
{{ reply.body|wiki_markdown:page }}
{% if reply.author == request.user %}
{% include 'dg_wiki/_comment_edit.html' with item=reply %}
{% endif %}
{% endfor %}
{% endfor %}
{% csrf_token %} {{ comment_form.body }}