{% extends 'layout.twig' %}
     
{% block body %}

    	<div class="contenu clearfix titre_div"  id="suiviEvenement">
        	<h1>{{ 'Suivi des demandes' | trad }}</h1>
        	
        	{{ ariane() }}
        	
        	<h2>        
        		{{ ('Demande' | trad) ~' '~ (module | trad)}}	    
        		{% if affichageBtnNew == 1 %}
                    <a onClick="ajaxPopup('{{ path('GlobalApplication.WorkflowEvenement.popupEvenementWF', {type: module, codeDemande: infoDemande.CODE_DEMANDE | trim}) }}', 'Ajout d\'un événement');" class="principal ajout button">{{ 'Nouvel évènement' | trad }}</a>
                {% endif %}
        	</h2>

            	<div class="block_edition">
                	<div class="titre_block">
                    	{{ 'Demande' | trad }}
                    </div>
                    <div class="colonne3">
                    	<div class="informations">
                    	    <p>
                            	<span class="champs_label">{{ 'Libelle' | trad }} :</span>
                                <span class="resultat">{{ infoDemande.WDEN_LIBELLE_ENREG }}</span>
                            </p>
                    	    <p>
                            	<span class="champs_label">{{ module | trad }}</span>
                                <span class="resultat">{{ infoDemande.CODE_ENREG }}</span>
                            </p>
                        </div>
                    </div>
                    <div class="colonne3">
                    	<div class="informations">
                    	    <p>
                            	<span class="champs_label">{{ 'Enregistre le' | trad }} :</span>
                                <span class="resultat">{{ infoDemande.DATE | dateTrad }}</span>
                            </p>
                        </div>
                    </div>
                    <div class="colonne3">
                    	<div class="informations">
                    	    <p>
                            	<span class="champs_label">{{ 'Type de demande' | trad }} :</span>
                                <span class="resultat">{{ infoDemande.TYPE_DEMANDE=='M'? ('Modification' | trad):('Création' | trad) }}</span>
                            </p>
                        </div>
                    </div>
                </div>

                <div id="suiviEvent">
                	<table class="table" style="margin-top:20px;">
                    	<thead class="thead-dark">
                        	<tr>
                        	<th scope="col" width="10%">{{ 'Date' | trad }}</th>
                                <th scope="col" width="10%">{{ 'Heure' | trad }}</th>                                    
                                <th scope="col">{{ 'Auteur' | trad }}</th> 
                                <th scope="col">{{ 'Libellé' | trad }}</th>
                                <th scope="col" width="5%">{{ 'Action' | trad }}</th>
                            </tr>
                         </thead>
                     	{% for event in listeEvent %}
                            <tr id="evenement{{ loop.index }}">
                                <td class="loupe">
                                    {{ event.DATE | dateTrad }} 
                                    {% if event.CONTMEMO  %}<span class="blocNote" style="position: absolute; right: 25px;"></span>{% endif %}
                            	</td>
                                <td>{{ event.HEURE | heureTrad }}</td>
                                <td>{{ event.UTIL=='BATCH'? event.UTIL: event.Util_NOM }}</td>
                                <td>{{ event.LIBELLE | trad }}</td>
                                <td class="parametrage" >
                                	{{ menuContextuel('evenement'~loop.index, false, event.menuContextuel, 6) }}     
                        		</td>
                            </tr>
                            <tr class="detail_ligne hide_detail" id="evenement{{ loop.index }}detail" >
                            	<td colspan="6">
                                	<div class="single row">
                                        <div class="informations">
                                        	<p class="gras">{{ 'Commentaires' | trad }} :</p>
                                        	<p>{{ event.CONTMEMO | nl2br }}</p>
                                        </div>
                                    </div>
                                 </td>
                             </tr>
                         {% endfor %}	
                	</table>
            	</div>

        </div>

{% endblock %}