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

{% block body %}
<div id="genetableau">
	<center>
    	<div>
    		<form method="POST" id='formListecontactParCentre'>
    			<input type="hidden" name="divCode" value="{{ post.divCode }}" />
    			<input type="hidden" name="divLibelle" value="{{ post.divLibelle }}" />
    			<input type="hidden" name="filter_egal_COD_CTR" value="{{ post.filter_egal_COD_CTR }}" />
    			<table class="table" id="tableau">
    				<thead class="thead-dark">
        				<tr>
        					<th>{{ triTable('CTC_NOM',  infoPagination.filter.tri_CTC_NOM, 'Nom' | trad, 'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ triTable('CTC_FONCTION',  infoPagination.filter.tri_CTC_FONCTION, 'Fonction' | trad,'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ triTable('CTC_TEL',  infoPagination.filter.tri_CTC_TEL, 'Téléphone' | trad,'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ triTable('CTC_FAX',  infoPagination.filter.tri_CTC_FAX, 'Fax' | trad,'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ triTable('CTC_TELPORT',  infoPagination.filter.tri_CTC_TELPORT, 'Portable' | trad,'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ triTable('CTC_MAIL',  infoPagination.filter.tri_CTC_MAIL, 'Email' | trad,'genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        				</tr>
        			</thead>
        			<tbody>
        				<tr>
        					<th>{{ filterTable('CTC_NOM', infoPagination.filter.filterCTC__NOM, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ filterTable('CTC_FONCTION', infoPagination.filter.filter_CTC_FONCTION, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ filterTable('CTC_TEL', infoPagination.filter.filter_CTC_TEL, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ filterTable('CTC_FAX', infoPagination.filter.filter_CTC_FAX, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ filterTable('CTC_TELPORT', infoPagination.filter.filter_CTC_TELPORT, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        					<th>{{ filterTable('CTC_MAIL', infoPagination.filter.filter_CTC_MAIL, '','genetableau', path('Ajax.liste.contactParCentre'), 'formListecontactParCentre') }}</th>
        				</tr>
        				{% for contact in contacts %}
        				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ contact.CTC_IND | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ contact.CTC_NOM~' ('~contact.CTC_IND~')' | convert_encoding('UTF-8', 'ISO-8859-1')}}");desactivePopup ()'>
        					<td>{{ contact.CTC_NOM | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
        					<td>{{ contact.CTC_FONCTION | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ contact.CTC_TEL | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ contact.CTC_FAX | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ contact.CTC_TELPORT | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        					<td>{{ contact.CTC_MAIL | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
        				</tr>
        				{% endfor %}
        			</tbody>
    			</table>
    	        {{ paginations(path('Ajax.liste.contactParCentre'), infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}	
    		</form>
    	</div>
	</center>
</div>
{% endblock %}