{#
 # This file is part of SolidInvoice package.
 #
 # (c) Pierre du Plessis <open-source@solidworx.co>
 #
 # This source file is subject to the MIT license that is bundled
 # with this source code in the file LICENSE.
 #}

{% extends "@SolidInvoiceCore/Layout/default.html.twig" %}

{% block title %}{{ "quote.list.title"|trans }}{% endblock %}

{% block content %}
    <div class="row">
        <div class="col-md-12">
            <div class="widget">
                {% if app.request.query.get('archived', '0') is same as('1') %}
                    <twig:DataGrid name="archived_quote_grid" />
                {% else %}
                    <twig:DataGrid name="quote_grid" />
                {% endif %}
            </div>

            <div class="text-center">
                {% if app.request.query.get('archived', '0') is same as('1') %}
                    <a class="btn btn-sm btn-outline-info text-center" href="?archived=0">{{ 'View active quotes'|trans }}</a>
                {% else %}
                    <a class="btn btn-sm btn-outline-info text-center" href="?archived=1">{{ 'View archived quotes'|trans }}</a>
                {% endif %}
            </div>

            <h5>{{ "quote.list.status_legend"|trans }}</h5>

            {% for status in quote_label() %}
                {{ status|raw }}
            {% endfor %}
        </div>
        {#<div class="col-md-3">
            <div class="card right-nav">
                <div class="card-body">
                    <a class="btn btn-block btn-info action-button" href="{{ path("_quotes_create") }}">
                        {{ icon('file', ['text', 'o']) }} {{ "quote.create"|trans }}
                    </a>

                    <ul class="list-group list-group-unbordered">
                        {% for status, count in status_list_count %}
                            <li class="list-group-item">
                                <label class="badge badge-pill">
                                    {{ count }}
                                </label>

                                {{ ('quote.stats.count.' ~ status)|trans({'%count%': count}) }}
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            </div>
        </div>#}
    </div>
{% endblock content %}
