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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListe'>
			<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('COD_CAR',  infoPagination.filter.tri_COD_CAR, 'Code' | trad, 'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
    					<th>{{ triTable('TITRE_CAR',  infoPagination.filter.tri_TITRE_CAR, 'Libellé' | trad,'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
						<th>{{ triTable('ORDRE_CAR',  infoPagination.filter.tri_ORDRE_CAR, 'Ordre' | trad,'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
						<th>{{ 'Icone' | trad }}</th>
					</tr>
    			</thead>
    			<tbody>
    				<tr>
    					<th>{{ filterTable('COD_CAR', infoPagination.filter.filter_COD_CAR, '', 'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
    					<th>{{ filterTable('TITRE_CAR', infoPagination.filter.filter_TITRE_CAR, '', 'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
						<th>{{ filterTable('ORDRE_CAR', infoPagination.filter.filter_ORDRE_CAR, '', 'tableau', path('Ajax.liste.typeCarSel'), 'formulaireListe') }}</th>
						<th></th>
					</tr>
    				{% for carSel in listeCarSel %}
    				
    				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ carSel.COD_CAR | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ carSel.TITRE_CAR | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
    					<td id ="{{carSel.COD_CAR}}">{{ carSel.COD_CAR | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
    					<td>{{ carSel.TITRE_CAR | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
						<td>{{ carSel.ORDRE_CAR | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
						<td><img style="width: 18px;" src="{{ carSel.ICONE_CAR }}"></td>
    				</tr>
    				{% endfor %}
    			</tbody>
			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.typeCarSel'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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