{% extends '@ajax-layout/layout.twig' %}

{% block body %}
<div class="tab-content">
    <div id="signataires-attendus" class="tab-pane fade in active clearfix">
        <form action="" method="post" name="form_signataires" id="form_signataires" class="clearfix" >
            <table class="table sans_actions">
                <thead class="thead-dark">
                    <tr>
                        <th scope="col" width="20%">{{ 'Date' | trad }}</th>
                        <th scope="col"width="50%">{{ 'Nom du signataire ou du groupe' | trad }}</th>    
                        {# Affichage role en suspens car need EVOL                                 #}
                        {# <th scope="col">{{ 'Rôle' | trad}}</th> #}
                        <th scope="col" width="15%">{{ 'Type' | trad}}</th>
                    </tr>
                </thead>
                <tbody>
                    
                {% for signataire in listeSignataire %}
                    {% if signataire.GROUPE_SIG == '' %}
                    <tr>
                        <td>{{ signataire.DTE_MISE | dateTrad }}</td>
                        <td>
                            {{ signataire.NOM }}
                            {% set listDeleg = mapListDelegBySignat[ signataire.CODE ] | default([]) %}                            
                            {% if listDeleg is not empty %}                            
                                <span class="modal_information white-tooltip" style="background-size: 23%;width:50%;">
                                    <span class="infos_tooltip activeLearn">
                                        <p>{{'Délégation du signataire' | trad}} :</p> <br>
                                        {% include '@GlobalApplication/Workflow/deleg.twig' 
                                            with {listDeleg: listDeleg} only %}
                                    </span>
                                </span>
                            {% endif %}
                        </td>
                        {# <td>{{ signataire.LIB_ROLE }}</td> #} 
                        <td>{{ signataire.INFORME | boolSql==0 ? ('Signataire' | trad):('Informé' | trad) }}</td>
                    </tr>	
                    {% else %}
                        <tr>
                        <td>{{ signataire.DTE_MISE | dateTrad }}</td>
                        <td>{{ signataire.WF_GS_NAME }}</td>
                        {# <td>{{ signataire.LIB_ROLE }}</td> #}
                        <td>{{ signataire.INFORME | boolSql==0 ? ('Signataire' | trad):('Informé' | trad) }}</td>
                    </tr>
                    {% endif %}
                {% endfor %}
                </tbody>
            </table>     	
        </form>
    </div>
</div>
<div class="modal-footer">
    <button type="button" class="button principal" onClick="desactivePopup();">{{ 'Fermer' | trad}}</button></a>
</div>
{% endblock %}