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

{% block body %}
<div id="genetableau">
	<center>
    	<div>
    		<form method="POST" id='formulairelistedirectio'>
    			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
    			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
    			<input type="hidden" name="CODE_STE" value="{{ post.CODE_STE }}" />
    			<table class="table" id="tableau">
    				<thead class="thead-dark">
        				<tr>
        					<th>{{ triTable('CODE_DIR',  infoPagination.filter.tri_CODE_DIR, 'Code direction' | trad, 'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        					<th>{{ triTable('LIBELLE',  infoPagination.filter.tri_LIBELLE, 'Libellé Direction' | trad,'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        					<th>{{ triTable('CODE_STE',  infoPagination.filter.tri_CODE_STE, 'Société' | trad,'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('CODE_DIR', infoPagination.filter.filter_CODE_DIR, '', 'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        					<th>{{ filterTable('LIBELLE', infoPagination.filter.filter_LIBELLE, '', 'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        					<th>{{ filterTable('CODE_STE', infoPagination.filter.filter_CODE_STE, '', 'genetableau', path('Ajax.liste.directio'), 'formulairelistedirectio') }}</th>
        				</tr>
        				{% for directio in directions %}
        				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ directio.CODE_DIR }}", "{{ post.divLibelle }}", "{{ directio.LIBELLE~' ('~directio.CODE_DIR~')' | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
        					<td>{{ directio.CODE_DIR | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
        					<td>{{ directio.LIBELLE | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ directio.CODE_STE | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
    		</form>
    		{{ paginations(path('Ajax.liste.directio'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
    	</div>
	</center>
</div>
{% endblock %}