{% extends 'layout.twig' %}
{% block body %}

    <div class="contenu">

        {% include '@Administration/GestionDroitUtilisateur/_entete.twig' %}
    
        <form method="post" name="filter_admin" id="filter_admin">
        
            <table class="table table-hover" id="mainTableCde">
                <thead class="thead-dark">
                    <tr>
                        <th scope="col">{{ triTable('COD_GRP',  post.tri_COD_GRP, 'Code' | trad, '', '', 'filter_admin') }}</th>
                        <th scope="col">{{ triTable('LIB_GRP',  post.tri_LIB_GRP, 'Libelle' | trad, '', '', 'filter_admin') }}</th>
                        <th scope="col" width="50px">
                            <a class="ajouter_blanc_v2  white-tooltip"  href="{{ path('Administration.GestionDroitUtilisateur.createGrpDroit') }}">
                                <span class="infos_tooltip left">
                                    {{ 'Ajouter un groupe de droit' | trad }}
                                </span>
                            </a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <tr class="recherche" >
                        <td>{{ filterTable('COD_GRP', post.filter_COD_GRP, '', 'COD_GRP', '','filter_admin', '','Code' | trad,'',true) }}</td>
                        <td>{{ filterTable('LIB_GRP', post.filter_LIB_GRP, '', 'LIB_GRP', '','filter_admin', '','Libelle' | trad,'',true) }}</td>
                        <td></td>
                    </tr>

                    {% for droit in listeGroupeDroit %}
                        <tr id="idGrp{{loop.index}}">
                            <td>{{ droit.COD_GRP }}</td>
                            <td>{{ droit.LIB_GRP }}</td>
                            <td>{{ menuContextuel('idGrp'~loop.index, false, droit.menuContextuel, 8) }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>

            {{ paginations(path(getRouteName()),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, '') }}
        
        </form>
    
    </div>


{% endblock %}