{% extends 'base.html.twig' %}

{% block title %}{% trans %}title_administration{% endtrans %}{% endblock %}

{% block body %}
<div class="row">
    <div class="col-md-6">
        <div class="card flat-card">
            <div class="row-table">
                <div class="col-sm-6 card-body br">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">person</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ users|length }}</h5>
                            <span>{% trans %}title_users{% endtrans %}</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 d-none d-md-table-cell d-lg-table-cell d-xl-table-cell card-body br">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">sticky_note_2</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ documents|length }}</h5>
                            <span>{% trans %}title_documents{% endtrans %}</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 card-body">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">account_box</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ directories|length }}</h5>
                            <span>{% trans %}title_directories{% endtrans %}</span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row-table">
                <div class="col-sm-6 card-body br">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">accessible</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ gangs|length }}</h5>
                            <span>{% trans %}title_gangs{% endtrans %}</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 d-none d-md-table-cell d-lg-table-cell d-xl-table-cell card-body br">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">folder_special</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ folders|length }}</h5>
                            <span>{% trans %}title_folders{% endtrans %}</span>
                        </div>
                    </div>
                </div>
                <div class="col-sm-6 card-body">
                    <div class="row">
                        <div class="col-sm-4">
                            <i class="material-icons-two-tone text-primary mb-1">people</i>
                        </div>
                        <div class="col-sm-8 text-md-center">
                            <h5>{{ groups|length }}</h5>
                            <span>{% trans %}title_groups{% endtrans %}</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <h6>{% trans %}title_last_users{% endtrans %}</h6>
        <hr>
        {% include '_cells/adminUserTable.html.twig' with {'users': users, 'noaction': true, 'noemail': true} %}
        <h6>{% trans %}title_last_gangs{% endtrans %}</h6>
        <hr>
        {% include '_cells/documentTable.html.twig' with {'documents': gangs, 'noaction': true}  %}
    </div>
    <div class="col-md-6">
        <h6>{% trans %}title_last_directories{% endtrans %}</h6>
        <hr>
        {% include '_cells/directoryTable.html.twig' with {'directories': directories, 'noaction': true} %}
        <h6>{% trans %}title_last_documents{% endtrans %}</h6>
        <hr>
        {% include '_cells/documentTable.html.twig' with {'documents': documents, 'noaction': true} %}

        <h6>{% trans %}title_last_folders{% endtrans %}</h6>
        <hr>
         {% include '_cells/documentTable.html.twig' with {'documents': folders, 'noaction': true} %}
    </div>
</div>

{% endblock %}
