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

{% block body %}

<div>
	<center>
    	<div id="genetableau">
    		<form method="POST" id='formListe'>
    			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
    			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
    			<input type="hidden" name="SOCIETE" value="{{ post.SOCIETE }}" />
    			<table class="table" id="tableau">
    				<thead class="thead-dark">
        				<tr>
        					<th>{{ triTable('DIR_CODE_DIRECTION',  infoPagination.filter.tri_DIR_CODE_DIRECTION, 'Code' | trad, 'genetableau', path('Specifique118.TableauReporting.listeSI'), 'formListe') }}</th>
        					<th>{{ triTable('DIR_DESIGNATION',  infoPagination.filter.tri_DIR_DESIGNATION, 'Libellé' | trad,'genetableau', path('Specifique118.TableauReporting.listeSI'), 'formListe') }}</th>
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('DIR_CODE_DIRECTION', infoPagination.filter.filter_DIR_CODE_DIRECTION, '','genetableau', path('Specifique118.TableauReporting.listeSI'), 'formListe') }}</th>
        					<th>{{ filterTable('DIR_DESIGNATION', infoPagination.filter.filter_DIR_DESIGNATION, '','genetableau', path('Specifique118.TableauReporting.listeSI'), 'formListe') }}</th>
        				</tr>
        				{% for ligne in listeSI %}
        				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ ligne.DIR_CODE_DIRECTION | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ ligne.DIR_DESIGNATION~' ('~ligne.DIR_CODE_DIRECTION~')' | convert_encoding('UTF-8', 'ISO-8859-1')}}");desactivePopup ()'>
        					<td>{{ ligne.DIR_CODE_DIRECTION | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
        					<td>{{ ligne.DIR_DESIGNATION | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
    	        {{ paginations(path('Specifique118.TableauReporting.listeSI'), infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}	
    		</form>
    	</div>
	</center>
</div>

{% endblock %}