{% extends 'base.html.twig' %}{% block content %} <h5 class="text-uppercase fw-bold"> <a href="{{ path('formations') }}"><button type="button" class="btn btn-secondary text-uppercase" data-bs-toggle="tooltip" data-bs-placement="bottom" title="Retour"><i class="bi bi-arrow-bar-left"></i> Liste Formations</button></a> <i class="bi bi-caret-right"></i> Fiche formation <i class="bi bi-caret-right"></i> <span class="text-decoration-underline">{{ formation.intitule }}</span> </h5> {% block navFormation %} {# MENU DE NAVIGATION ONGLETS #} {% include "navigation_onglets_formations.twig" %} {% endblock %} <div class="row"> <div class="col-12 mt-3"> <div class="card m-auto" style="width: 100%"> <h5 class="p-3 text-uppercase fw-bold bg-dark text-white"> <i class="bi bi-calendar-week"></i> Planning de la formation <span class="float-end badge bg-{{ formationEtat.colors }}">{{ formationEtat.intitule }}</span> </h5> <div class="card-body"> <p class="card-text"> {% if plannings %} <div class="row justify-content-end"> <div class="col-3 text-end"> <a href="{{ path('planning_formateurs_generer_pdf', {'idFormation': formation.id})}}" class="btn btn-secondary btn-sm" target="_blank"><i class="bi bi-printer"></i> Imprimer le planning (PDF)</a> </div> {% if app.user.roles[0] != 'ROLE_CD' or app.user.roles[0] == 'ROLE_CFC' %} <div class="col-3 text-end"> <a href="{{ path('planning_formateurs_mail', {'idFormation': formation.id})}}" class="btn btn-primary btn-sm"><i class="bi bi-envelope"></i> Envoyer le planning aux formateurs</a> </div> {% endif %} </div> {% endif %} <div class="mt-3"> {% if plannings %} <table class="table table-striped table-hover" style="font-size: 14px;"> <thead> <th></th> <th></th> <th>Domaine</th> <th>Intitulé</th> <th>Durée</th> <th>Date</th> <th>MA Début</th> <th>MA Fin</th> <th>AP Fin</th> <th>AP Fin</th> <th>Salle</th> <th>Formateur(trice)</th> </thead> <tbody> {% for planning in plannings %} {% if planning.etat == 2 %} {% set textBarre = 'text-decoration:line-through;' %} {% else %} {% set textBarre = '' %} {% endif %} <tr style="{{ textBarre }}"> <td> {% if app.user.roles[0] != 'ROLE_CD' or app.user.roles[0] == 'ROLE_CFC' %} {% if formation.etat == 1 %} <a href="{{ path('formations_plannings_modifier', {'idFormation': formation.id, 'idPlanning': planning.id}) }}" class="btn btn-secondary btn-sm">Modifier</a> {% elseif formation.etat == 2 and planning.etat == 1 %} <a href="{{ path('formations_plannings_annuler', {'idFormation': formation.id, 'idPlanning': planning.id}) }}" class="btn btn-danger btn-sm">Annuler</a> {% endif %} {% endif %} </td> <td>{# {{ loop.index }} #}</td> <td><span class="badge {{ domainesColors[planning.domaine] }}">{{ planning.domaine }}</span></td> <td>{{ planning.intitule }}</td> <td style="white-space: nowrap;">{{ planning.duree }} h</td> <td style="white-space: nowrap;">{{ planning.dateDebut|date("d/m/Y") }}</td> <td style="white-space: nowrap;" class="text-center"> {% if planning.matinHoraireDebut|date('H:i') != '00:00' %} {{ planning.matinHoraireDebut|date("H:i") }} {% else %} --- {% endif %} </td> <td style="white-space: nowrap;" class="text-center"> {% if planning.matinHoraireFin|date('H:i') != '00:00' %} {{ planning.matinHoraireFin|date("H:i") }} {% else %} --- {% endif %} </td> <td style="white-space: nowrap;" class="text-center"> {% if planning.apresMidiHoraireDebut|date('H:i') != '00:00' %} {{ planning.apresMidiHoraireDebut|date("H:i") }} {% else %} --- {% endif %} </td> <td style="white-space: nowrap;" class="text-center"> {% if planning.apresMidiHoraireFin|date('H:i') != '00:00' %} {{ planning.apresMidiHoraireFin|date("H:i") }} {% else %} --- {% endif %} </td> <td style="white-space: nowrap;"> {{ planning.salle.intitule }} </td> <td style="white-space: nowrap;">{{ planning.formateur.nom|upper }} {{ planning.formateur.prenom }}</td> </tr> {% endfor %} </tbody> <!-- <tfoot> <td colspan="5"></td> </tfoot> --> </table> {% else %} <div class="alert alert-secondary fst-italic">Aucun planning</div> {% endif %} </div> {% if not plannings %} <div class="text-end"> <a href="{{ path('formations_plannings', {'idFormation': formation.id}) }}" class="btn btn-primary btn-sm">Construire</a> </div> {% else %} <div class="text-end"> <a href="{{ path('formations_plannings_supprimer', {'idFormation': formation.id})}}" class="btn btn-danger btn-sm" target="_blank">Supprimer le planning</a> </div> {% endif %} </p> </div> </div> </div> </div> <div class="mb-5"></div> {% endblock %}