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

{% block body %}

    <div id="documents_rattaches" class="tab-pane fade in active">
        <form method="POST" id='formulaireGeneral'>
            <input type="hidden" name="id" id="id" value="{{ splitId }}" />
            <input type="hidden" name="NO_DA" id="NO_DA" value="{{ post.NO_DA }}" />
            <table class="table table-hover">
                <thead class="thead-dark">
                    <tr>
                        <th scope="col" width="220px">{{'Titre' | trad}}</th>
                        <th scope="col" width="220px">{{'Nom d\'origine' | trad}}</th>
                    </tr>
                </thead>
                <tbody>
                    {% for docAtt in listeDocument %} 
                    <tr id="document{{loop.index}}">
                        <td>{{ docAtt.TITRE }}</td>
                        <td>
                            <a href="{{ path('GlobalApplication.AjaxDocRattaches.downloadFichier', {id: docAtt.COD_ENR, ordre: docAtt.NO_ORDRE, NO_DA: docAtt.NO_DA}) }}" target="_blank">
                                {{ docAtt.NOM_ORI }}
                            </a>
                        </td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </form>
    </div>
                            

{% endblock %}