{% extends "ext/base.html" %}
{% load extras %}

{% block css %}
    {% include "ext/enquiry_published/body.css" %}
    {% include "ext/quote_comment/body.css" %}
{% endblock %}

{% block content %}
    <tr>
        <td class="letter__title letter__line center">
            <p><a href="{% base_url "external" %}/myproposals/{{ quote.id }}?{{ token | uauth }}#comment-anchor={{ comment.id }}">Новый комментарий</a> к вашему предложению</p>
        </td>
    </tr>

    <tr>
        <td class="letter__line">
            <p><b>{{ author.full_name }}</b>, {{ comment.created_at | date:"j E Y H:i T" }}</p>
            <p class="text-line">
                {{ comment.message | linebreaksbr }}
            </p>
        </td>
    </tr>

    <tr>
        <td class="letter__attrs">
            <table class="attrs table" border="0" cellspacing="0" cellpadding="0" width="100%">
                <tbody>
                    {% if attachments %}
                        <tr>
                            <td class="attrs__cell attrs__key">Файлы</td>
                            <td class="attrs__cell attrs__value">
                                {% for attachment in attachments %}
                                    <a class="attrs__file text" href="{{ attachment | attachment_url:"external" }}?{{ token | uauth }}">{{ attachment.filename }}</a>
                                {% endfor %}
                            </td>
                        </tr>
                    {% endif %}
                <tbody>
            </table>
        </td>
    </tr>

    <tr>
        <td class="letter__action">
            <table class="table" border="0" cellspacing="0" cellpadding="0" width="100%">
                <tbody>
                    <tr>
                        <td class="center action">
                            <table class="action__button" align="center" cellpadding="0" cellspacing="0">
                                <tbody>
                                    <tr>
                                        <td class="action__button_border" align="center" valign="middle">
                                            <a class="action__button_border" href="{% base_url "external" %}/myproposals/{{ quote.id }}?{{ token | uauth }}" target="_blank">&nbsp;</a>
                                        </td>
                                        <td height="32" valign="middle">
                                            <a class="action__button_center" href="{% base_url "external" %}/myproposals/{{ quote.id }}?{{ token | uauth }}" target="_blank">Ответить</a>
                                        </td>
                                        <td class="action__button_border" align="center" valign="middle">
                                            <a class="action__button_border" href="{% base_url "external" %}/myproposals/{{ quote.id }}?{{ token | uauth }}" target="_blank">&nbsp;</a>
                                        </td>
                                    </tr>
                                <tbody>
                            </table>
                        </td>
                    </tr>
                <tbody>
            </table>
        </td>
    </tr>

    <tr>
        <td class="letter__line letter__attrs letter__overlined">
            <table class="attrs table" border="0" cellspacing="0" cellpadding="0" width="100%">
                <tbody>
                    <tr>
                        <td class="attrs__cell attrs__key">Запрос</td>
                        <td class="attrs__cell attrs__value text"><a class="text" href="{% base_url "external" %}/myproposals/{{ quote.id }}?{{ token | uauth }}">{{ enquiry.key }}: {{ enquiry.subject }}</a></td>
                    </tr>
                <tbody>
            </table>
        </td>
    </tr>
{% endblock %}
