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

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

{% block content %}

    <tr>
        <td class="letter__title letter__line center"><p>Сбор предложений завершён</p></td>
    </tr>

    <tr>
        <td class="letter__line letter__subject">
            <a class="subject text" href="{% base_url "internal" %}/{{ enquiry.key }}">{{ enquiry.key }}: {{ enquiry.subject }}</a>
        </td>
    </tr>

    <tr>
        <td class="letter__line letter__attrs">
            <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">{{ request.deadline_at | date:"j E Y H:i T" }}</td>
                    </tr>
                    {% if manager %}
                    <tr>
                        <td class="attrs__cell attrs__key">Исполнитель</td>
                        <td class="attrs__cell attrs__value text"><a class="text" href="http://staff/{{ manager.username }}">{{ manager.full_name }}</a></td>
                    </tr>
                    {% endif %}

                    {% if quotes %}
                    <tr>
                        <td class="attrs__cell attrs__key">Полученные предложения</td>
                        <td class="attrs__cell attrs__value">
                            {% for quote in quotes %}
                                <p><a class="attrs__file text" href="{% base_url "internal" %}/{{ enquiry.key }}/proposals?proposal={{ quote.id }}">{{ quote.title }}</a></p>
                            {% endfor %}
                        </td>
                    </tr>
                    {% endif %}
                <tbody>
            </table>
        </td>
    </tr>

    <tr>
        <td class="letter__proposal">
            <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 "internal" %}/{{ enquiry.key }}/summary" target="_blank">&nbsp;</a>
                                        </td>
                                        <td height="32" valign="middle">
                                            <a class="action__button_center" href="{% base_url "internal" %}/{{ enquiry.key }}/summary" target="_blank">Перейти&nbsp;в&nbsp;свод</a>
                                        </td>
                                        <td class="action__button_border" align="center" valign="middle">
                                            <a class="action__button_border" href="{% base_url "internal" %}/{{ enquiry.key }}/summary" target="_blank">&nbsp;</a>
                                        </td>
                                    </tr>
                                <tbody>
                            </table>
                        </td>
                    </tr>
                <tbody>
            </table>
        </td>
    </tr>


{% endblock %}
