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

{% block body %}
<div id="genetableau">
		<form method="POST" id='formulairePunchout'>
			<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('ORDRE',  post.tri_ORDRE, 'Ordre' | trad, 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ triTable('TAG_XML',  post.tri_TAG_XML, 'Elément XML' | trad, 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ triTable('LONGUEUR',  post.tri_LONGUEUR, 'Longueur' | trad, 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ triTable('DESCRIPTION',  post.tri_DESCRIPTION, 'Description' | trad, 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <th>{{ filterTable('ORDRE', post.filter_ORDRE, '', 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ filterTable('TAG_XML', post.filter_TAG_XML, '', 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ filterTable('LONGUEUR', post.filter_LONGUEUR, '', 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                        <th>{{ filterTable('DESCRIPTION', post.filter_DESCRIPTION, '', 'tableau', path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}), 'formulairePunchout') }}</th>
                    </tr>
                    {% for mapping in listeMapping %}
                        <tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ mapping.TAG_XML | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "");desactivePopup ()'>
                            <td id ="{{mapping.ORDRE}}">{{ mapping.ORDRE | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
                            <td>{{ mapping.TAG_XML | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
                            <td>{{ mapping.LONGUEUR | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
                            <td>{{ mapping.DESCRIPTION | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
                        </tr>
                    {% endfor %}
                </tbody>
			</table>
			
		</form>
		
	{{ paginations(path('Catalogue.parametrageFormat.popupMapping', {typeFormat:typeFormat}),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
</div>
{% endblock %}