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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListefamille'>
			<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_FAM',  infoPagination.filter.tri_CODE_FAM, 'Code' | trad, 'genetableau', path('Ajax.liste.famille'), 'formulaireListefamille') }}</th>
        					<th>{{ triTable('DESIGNAT',  infoPagination.filter.tri_DESIGNAT, 'Libellé' | trad, 'genetableau', path('Ajax.liste.famille'), 'formulaireListefamille') }}</th>
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('CODE_FAM', infoPagination.filter.filter_CODE_FAM, '', 'genetableau', path('Ajax.liste.famille'), 'formulaireListefamille') }}</th>
        					<th>{{ filterTable('DESIGNAT', infoPagination.filter.filter_DESIGNAT, '', 'genetableau', path('Ajax.liste.famille'), 'formulaireListefamille') }}</th>
        				</tr>
        				{% for famille in entity %}
        				
        				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ famille.CODE_FAM }}", "{{ post.divLibelle }}", "{{ famille.DESIGNAT~' ('~famille.CODE_FAM~')' | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
        					<td>{{ famille.CODE_FAM | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ famille.DESIGNAT | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>        
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.famille'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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