{% load i18n %}
{% load humanize %}

<div class="panel panel-default panel-srp-request-overview">
    <div class="panel-heading">
        <div class="panel-title">
            {% translate "Overview" %}
        </div>
    </div>

    <div class="panel-body">
        <!-- left panel -->
        <div class="col-md-3 panel-srp-request-overview-column">
            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "Requests" %}:</dt>
                <dd>{% translate "Total" %}: <span class="srp-requests-total-count">{{ srp_link.total_requests }}</span></dd>
                <dd>{% translate "Pending" %}: <span class="srp-requests-pending-count">{{ srp_link.pending_requests }}</span></dd>
                <dd>{% translate "Approved" %}: <span class="srp-requests-approved-count">{{ srp_link.approved_requests }}</span></dd>
                <dd>{% translate "Rejected" %}: <span class="srp-requests-rejected-count">{{ srp_link.rejected_requests }}</span></dd>
            </div>
        </div>

        <!-- middle left panel-->
        <div class="col-md-3 panel-srp-request-overview-column">
            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "Fleet Name" %}:</dt>
                <dd>{{ srp_link.srp_name }}</dd>
            </div>

            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "Fleet Commander" %}:</dt>
                <dd>{{ srp_link.fleet_commander }}</dd>
            </div>

            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "Fleet Time" %}:</dt>
                <dd>{{ srp_link.fleet_time|date:"Y-m-d H:i" }}</dd>
            </div>
        </div>

        <!-- middle right panel -->
        <div class="col-md-3 panel-srp-request-overview-column">
            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "Doctrine" %}:</dt>
                <dd>{{ srp_link.fleet_doctrine }}</dd>
            </div>

            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "SRP Code" %}:</dt>
                <dd>{{ srp_link.srp_code }}</dd>
            </div>
        </div>

        <!-- right panel -->
        <div class="col-md-3 panel-srp-request-overview-column">
            <div class="panel-srp-request-overview-cell">
                <dt>{% translate "SRP Cost" %}:</dt>
                <dd class="srp-fleet-total-amount">{{ srp_link.total_cost|intcomma }} ISK</dd>
            </div>
        </div>
    </div>

    <div class="panel-footer">
        {% if srp_link.srp_status != "Completed" %}
            <button class="btn btn-primary btn-sm pull-right"
                data-toggle="modal"
                data-target="#srp-link-mark-complete-modal"
                data-modal-type="modal-action"
            >
                {% translate "Mark Completed" %}
            </button>
        {% endif %}

        <a class="btn btn-primary btn-sm" href="{% url 'aasrp:dashboard' %}">
            <i class="fas fa-arrow-circle-left"></i>
            {% translate "Back to SRP overview" %}
        </a>
    </div>
</div>
