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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulairelisteuo'>
			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
			
			<table class="table" id="tableau">
				<thead class="thead-dark">
    				<tr>
    					<th>{{ triTable('CODE_UO',  infoPagination.filter.tri_CODE_UO, 'Code' | trad, 'genetableau', path('Ajax.liste.uo'), 'formulairelisteuo') }}</th>
    					<th>{{ triTable('LIB_UO',  infoPagination.filter.tri_LIB_UO, 'Nom' | trad,'genetableau', path('Ajax.liste.uo'), 'formulairelisteuo') }}</th>
    				</tr>
    			</thead>
    			<tbody>
    				<tr>
    					<th>{{ filterTable('CODE_UO', infoPagination.filter.filter_CODE_UO, '', 'genetableau', path('Ajax.liste.uo'), 'formulairelisteuo') }}</th>
    					<th>{{ filterTable('LIB_UO', infoPagination.filter.filter_LIB_UO, '', 'genetableau', path('Ajax.liste.uo'), 'formulairelisteuo') }}</th>
    				</tr>
    				{% for uo in entity %}
    				
    				<tr onclick="{{ attrJs('changeCodeLibelle', [post.divCode, uo.CODE_UO, post.divLibelle, uo.LIB_UO ~ ' (' ~ uo.CODE_UO ~ ')']) }};desactivePopup()">
    					<td>{{ uo.CODE_UO | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
    					<td>{{ uo.LIB_UO | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
    				</tr>
    				{% endfor %}
    			</tbody>
			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.uo'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

	</center>
	</div>
{% endblock %}