{% load comments i18n %}

{% block comment-separator %}
    <br />
{% endblock %}

{% get_comment_count for parent as comment_count %}

{% if comment_count %}
    {% blocktrans %}{{ comment_count }} comments.{% endblocktrans %}

    {% block comment-list %}
        <ul class="comment-list">
        {% get_comment_list for parent as comment_list %}
        {% for comment in comment_list %}
            <li class="comment-list-entry">
            {% block comment-list-entry %}{# TODO: get_username/etc below #}
                {% blocktrans with comment.user.username as comment_username and comment.submit_date|date:"Y-m-d H:i" as comment_submit_date %}
                    {{ comment_username }} said on {{ comment_submit_date }}<br />
                {% endblocktrans %}
                {{ comment.comment }}
            {% endblock comment-list-entry %}
            </li>
        {% endfor %}
        </ul>
    {% endblock comment-list %}
{% else %}
    {% trans "No comments." %}
{% endif %}

{% block comment-form %}
    {% if content.comments_enabled %}
        <form action="{{ feincms_page.get_absolute_url }}" method="post" id="form-comment">
            {% csrf_token %}
            {{ form.as_p }}
            <input type="submit" name="post" id="submit" value="{% trans "Post Comment" %}" />
        </form>
    {% endif %}
{% endblock comment-form %}
