{% if not request.is_xhr %} {% endif %}
{% if not Config.get('comments', 'requires_login') or current_user.is_authenticated() %}
{% for field in form %} {% if field.type in ['CSRFTokenField', 'HiddenField'] %} {{ field() }} {% endif %} {% endfor %}
{% if current_user.is_authenticated() %} {{form.author_name(value=current_user.name, type="hidden")}} {{current_user.name}} {% else %} {{form.author_name(class="form-control", placeholder="your name", required="required")}} {% endif %}
{% if current_user.is_authenticated() %} {{form.author_email(value=current_user.email, type="hidden")}} {{current_user.email}} {% else %} {{form.author_email(class="form-control", placeholder="you@domain.com", required="required", type="email")}} {% endif %}
{{form.body(class="", rows="3", columns="90")}}
{% else %} Login to add a comment {% endif %} {% if request.method == "POST" and not current_user.is_authenticated() %} Thanks, your comment will be moderated! {% endif %} {% for comment in comments %}
{% if comment.gravatar_email %} {{comment.author_name}} {% endif %}
@{{comment.author_name}} at {{comment.created_at.strftime("%m/%d/%Y %H:%M")}}
{{comment.body|urlize|markdown}}
{%for reply in comment.replies.filter(parent="") %}
64x64
@{{reply.author_name}} at {{reply.created_at.strftime("%m/%d/%Y %H:%M")}}
{{reply.body|urlize|markdown}} {%for treply in comment.replies.filter(parent=reply.uid) %}
64x64
@{{treply.author_name}} at {{treply.created_at.strftime("%m/%d/%Y %H:%M")}}
{{treply.body|urlize|markdown}}
{% endfor %}
{% endfor %}
{% endfor %}