{% load i18n %}
{% load comments %}
{% if comment_object %}
<div>
    {% get_comment_list for comment_object as comment_list %}
    <dl class="comments">
      {% for comment in comment_list reversed %}
        <dt class="align-right"><span class="datetime">{{ comment.modified|date:"F d, Y, H:i:s a" }}&nbsp;</span></dt>
        {% ifequal comment.comment_type 'decline_preview' %}<b>Preview Decline:</b>
            <dd class="edit-comment">{{ comment.comment }}</dd>
        {% else %}
            <dd class="edit-comment">{{ comment.comment }}</dd>
        {% endifequal %}
        <dt class="submitted-by">
            <span>
                <em>{% trans 'Submitted by' %}&nbsp;{{ comment.name }}</em>
            </span>
            {% ifequal user comment.user %}
                <button class="align-right btn-neutral btn-small btn-comment comment-edit" data-url="{% url 'publisher_comments:api:comments' comment.id %}">Edit</button>
            {% endifequal %}
        </dt>
        <hr>
      {% endfor %}
    </dl>
</div>
{% endif %}
