{% extends 'layout.twig' %}

{% block body %}
    <div class="contenu clearfix">
    
        <h1>
        	{{ 'Table des Opérations' | trad }}

            {{ Button('Nouvelle Opération' | trad, true, path('ProjetAchat.CreationTableOperation.creation', {mode : 'creation'}), '', {}, false, 'ajout') }}
    	</h1>

		{{ ariane() }}
    	
    	<div class="tab-content">		
        	<div id="gestionTableOperations" class="tab-pane fade in active">
				<form method="post" name="filtre_societe" id="filtre_societe">				
					<table class="table table-hover">
						<thead class="thead-dark">
							<tr>
								<th scope="col" width='7%'>{{ triTable('CODE_OPE',  infoPagination.filter.tri_CODE_OPE, 'Code' | trad, '', '', 'filtre_societe') }}</th>
								<th scope="col" width='25%'>{{ triTable('LIB',  infoPagination.filter.tri_LIB, 'Libellé' | trad, '', '', 'filtre_societe') }}</th>
								<th scope="col">{{ triTable('DESCR',  infoPagination.filter.tri_DESCR, 'Description' | trad, '', '', 'filtre_societe') }}</th>
							    <th scope="col" width='8%'>{{ triTable('DATE_DEB',  infoPagination.filter.tri_DATE_DEB, 'Date de début' | trad, '', '', 'filtre_societe') }}</th>
							    <th scope="col" width='8%'>{{ triTable('DATE_FIN',  infoPagination.filter.tri_DATE_FIN, 'Date de fin' | trad, '', '', 'filtre_societe') }}</th>
								<th scope="col" width="100px">{{ 'Actions' | trad }}</th>
							</tr>
						</thead>
						<tbody>
							<tr class="recherche">
								<td>{{ filterTable('CODE_OPE', infoPagination.filter.filter_CODE_OPE, '', '', '', 'filtre_societe', '', 'Code' | trad) }}</td>
								<td>{{ filterTable('LIB', infoPagination.filter.filter_LIB, '', '', '', 'filtre_societe', '', 'Libellé' | trad) }}</td>
								<td>{{ filterTable('DESCR', infoPagination.filter.filter_DESCR, '', '', '', 'filtre_societe', '', 'Description' | trad) }}</td>
                                <td>{{ filterTable('date_DATE_DEB', infoPagination.filter.filter_date_DATE_DEB, '', '', '', 'filtre_societe','datepicker', 'Date de début' | trad) }}</td>
                                <td>{{ filterTable('date_DATE_FIN', infoPagination.filter.filter_date_DATE_FIN, '', '', '', 'filtre_societe','datepicker', 'Date de fin' | trad) }}</td>
								<td></td>
							</tr>
						{% for TableOperation in listeTableOperation %}
							<tr id="TableOperation{{ loop.index }}">
								<td>{{ TableOperation.CODE_OPE }}</td>
								<td>{{ TableOperation.LIB }}</td>
								<td class="white-tooltip">{{ shortLibelle(TableOperation.DESCR, 100) }}</td>
								<td>{{ TableOperation.DATE_DEB | dateTrad }}</td>
								<td>{{ TableOperation.DATE_FIN | dateTrad }}</td>
								<td class="parametrage">
                                    {{ Button('Modifier' | trad, true, path('ProjetAchat.CreationTableOperation.creation', {mode : 'modification', idOperation : TableOperation.CODE_OPE}), '', {}, false, '') }}
								</td>
							</tr>
						{% endfor %}
						</tbody>
					</table>
					{{ paginations(path('ProjetAchat.TableOperation.tableOperation'),infoPagination.nombreDePage, infoPagination.page, infoPagination.post, '') }}
				
				</form>
			</div>
        </div>
    </div>

{% endblock %}