{#
 # 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 %}{{ 'clients'|trans }}{% endblock title %}

{% block heading %}
    <div class="float-right header-button">
        <a class="btn btn-info" href="{{ path("_clients_add") }}">
            {{ icon('user-plus') }} {{ "client_create"|trans }}
        </a>
    </div>
{% endblock %}

{% block content %}
    <br class="clearfix" />
    <div class="widget">
        {% if app.request.query.get('archived', '0') is same as('1') %}
            <twig:DataGrid name="archived_client_grid" />
        {% else %}
            <twig:DataGrid name="client_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 clients'|trans }}</a>
        {% else %}
            <a class="btn btn-sm btn-outline-info text-center" href="?archived=1">{{ 'View archived clients'|trans }}</a>
        {% endif %}
    </div>
{% endblock %}
