{% extends 'layout.twig' %}

{% block body %}
    <div class="contenu clearfix"  id="projetAchat">
    	<h1>{{ 'Tableau de bord Opérationnel' | trad }}</h1>
    	
        {{ ariane() }}
    	
    	<div class="tab-content">
    		<form method="post" name="filtre_projetAchat" id="filtre_projetAchat" style="margin-top:20px;">
    		
                <table class="table table-hover">
                  	<thead class="thead-dark">
                        <tr>
                            <th scope="col">{{ 'Libellé' | trad }}</th>
							<th scope="col">{{ 'Detail' | trad }}</th>
							<th scope="col">{{ 'Date début' | trad }}</th>
							<th scope="col">{{ 'Date fin' | trad }}</th>
							<th  scope="col"></th>
                        </tr>
                  	</thead>
                  	{% for action in listeAction %}
                      	<tr style="cursor: pointer;" onClick="redirectJSWithPost('{{ path('ProjetAchat.Action.execute', {typeObjet:action.TYPE_OBJET, idObjet:action.ID_OBJET, idAction:action.ID_ACTION}) }}');">
                      		<td>{{ action.LIB }}</td>
                      		<td>{{ action.LIB_tache }}, {{ action.LIB_doa }}</td>
                      		<td>{{ action.LIB_date_deb | dateTrad }}</td>
                      		<td>{{ action.LIB_date_fin | dateTrad }}</td>
                      		<td>
                				{% if action.LIB_date_fin < dateDuJours %}
                					<div class="img_cercle rouge"></div>
                				{% elseif action.LIB_date_prev <= dateDuJours and dateDuJours <= action.LIB_date_fin %}
                					<div class="img_cercle orange"></div>
                				{% else %}
                					<div class="img_cercle vert"></div>
                				{% endif %}
                      		</td>
                      	</tr>
                  	{% endfor %}
    		
    		</form>
		</div>
    	
	</div>
{% endblock %}