{% load i18n %}
{% load devilry_group_tags %}

<span class="devilry_email_comment_assignment">{% trans "Assignment" context "devilry comment email" %}: {{ comment.feedback_set.group.parentnode.long_name }}</span>
<br>
<span class="devilry_email_comment_added_datetime">{% trans "Added datetime" context "devilry comment email" %}: {{ comment.published_datetime|date:"DATETIME_FORMAT" }}</span>
<br><br>

{% if comment.text %}
    <hr>
    <span class="devilry_email_comment_text">
        {{ comment.text|devilry_group_markdown|safe }}
    </span>
    <hr>
    <br><br>
{% endif %}

{% if comment.commentfile_set.exists %}
    <span class="devilry-email-comment-uploaded-files">
        <p>
            {% trans "Uploaded files" context "devilry comment email" %}:
        </p>
        {% for commentfile in comment.commentfile_set.all %}
            <span class="devilry-email-comment-uploaded-file-meta">
                <strong>
                    {{ commentfile.filename }}
                </strong>&nbsp;({{ commentfile.filesize|filesizeformat }})
            </span>
            {% if not forloop.last %}<br>{% endif %}
        {% endfor %}
    </span>
{% endif %}

<br><br>
<span class="devilry_email_comment_detail">
    <span class="devilry_email_comment_detail_text">
        {% trans "See the delivery feed for more details" context "devilry comment email" %}:
    </span>
    <span class="devilry_email_comment_detail_url"><a href="{{ url }}">{{ url }}</a></span>
</span>

<br><br>
