Commit 17666096 authored by Johnny Leveneur's avatar Johnny Leveneur
Browse files

gestion ateliers affichage des sites

parent 24bedb77
Loading
Loading
Loading
Loading
+0 −0

File moved.

+3 −1
Original line number Diff line number Diff line
@@ -370,3 +370,5 @@ select * from etudiant_etudiant
             -- id = 'ESAM_minapinpin479@gmail.com' ;

select * from unicaen_utilisateur_user where email = 'minapinpin479@gmail.com' ;

alter table public.unicaen_mail_mail add attachment_paths text ;
 No newline at end of file
+25 −0
Original line number Diff line number Diff line
@@ -87,6 +87,31 @@ class Atelier implements HistoriqueAwareInterface
        return  $villes->toArray();
    }

    public function getNomVilles(): string
    {
        $villes = $this->getVilles();
        $nomVilles = [];
        foreach ($villes as $ville) {
            $nomVilles[] = $ville->getNom();
        }
        $nomVilles = array_unique($nomVilles);
        //supprimer les valeurs null
        $nomVilles = array_filter($nomVilles);
        return implode(', ', $nomVilles);
    }

    public function getSites(): string
    {
        $sites = [];
        foreach ($this->getSessions() as $session) {
            $sites[] = $session->getSite()?->getLibelle();
        }
        $sites = array_unique($sites);
        //supprimer les valeurs null
        $sites = array_filter($sites);
        return implode(', ', $sites);
    }

    public function getLibelleEtVilles(): string
    {
        $libelle = $this->getLibelle();
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ $this->headTitle("Ateliers");
    <thead>
    <tr>
        <th> Libellé</th>
        <th> Site(s) </th>
        <th> Groupe</th>
        <th class="action"> Action</th>
    </tr>
@@ -67,6 +68,7 @@ $this->headTitle("Ateliers");
    <?php foreach ($ateliers as $atelier) : ?>
        <tr id="<?php echo $atelier->getId(); ?>" class="<?php if ($atelier->estHistorise()) echo "historise"; ?>">
            <td> <?php echo $atelier->getLibelle(); ?> </td>
            <td> <?php echo $atelier->getSites() ?></td>
            <td>
                <?php if ($atelier->getGroupe() !== null) : ?>
                    <?php echo $atelier->getGroupe()->getLibelle(); ?>