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

{% block body %}
<div id="genetableau">
	<center>
	<div>
		<form method="POST" id='formulaireListeMarche'>
			<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',  infoPagination.filter.tri_CODE, 'Code' | trad, 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ triTable('LIBELLE',  infoPagination.filter.tri_LIBELLE, 'Nom marché' | trad,'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ triTable('TYPEMARC',  infoPagination.filter.tri_TYPEMARC, 'Type de marché' | trad,'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ triTable('MNTPREMIN',  infoPagination.filter.tri_MNTPREMIN, 'Montant min' | trad,'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ triTable('MNTPREMAX',  infoPagination.filter.tri_MNTPREMAX, 'Montant max' | trad,'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
    				</tr>
    			</thead>
    			<tbody>
    				<tr>
    					<th>{{ filterTable('CODE', infoPagination.filter.filter_CODE, '', 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ filterTable('LIBELLE', infoPagination.filter.filter_LIBELLE, '', 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ filterTable('TYPEMARC', infoPagination.filter.filter_TYPEMARC, '', 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ filterTable('MNTPREMIN', infoPagination.filter.filter_MNTPREMIN, '', 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
						<th>{{ filterTable('MNTPREMAX', infoPagination.filter.filter_MNTPREMAX, '', 'genetableau', path('Ajax.liste.marches'), 'formulaireListeMarche') }}</th>
    				</tr>
    				{% for marches in listeMarches %}
    				
    				<tr onclick='changeCodeLibelle("{{ post.divCode }}","{{ marches.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}", "{{ post.divLibelle }}", "{{ marches.LIBELLE~' ('~marches.CODE~')' | convert_encoding('UTF-8', 'ISO-8859-1') }}");desactivePopup ()'>
    					<td>{{ marches.CODE | convert_encoding('UTF-8', 'ISO-8859-1')  }}</td>
						<td>{{ marches.LIBELLE | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
						<td>{{ marches.TYPEMARC | convert_encoding('UTF-8', 'ISO-8859-1') }}</td>
						<td class="tableau_row_marche">{{ (marches.MNTPREMIN | convert_encoding('UTF-8', 'ISO-8859-1')) | prix  }}</td>
						<td class="tableau_row_marche">{{ (marches.MNTPREMAX | convert_encoding('UTF-8', 'ISO-8859-1')) | prix }}</td>
    				</tr>
    				{% endfor %}
    			</tbody>
			</table>
			
		</form>
		
	{{ paginations(path('Ajax.liste.marches'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, 'modal-body') }}
	</div>

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