Loading module/Atelier/src/Entity/Db/Atelier.php +23 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Atelier\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Fichier\Entity\Db\Fichier; use Site\Entity\Db\Ville; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait; Loading Loading @@ -75,6 +76,28 @@ class Atelier implements HistoriqueAwareInterface return $this->sessions->toArray(); } /** @return Ville[] */ public function getVilles(): array { $villes = new ArrayCollection(); foreach ($this->getSessions() as $session) { $ville = $session->getSite()?->getVille(); if($ville and !$villes->contains($ville)) $villes[] = $ville; } return $villes->toArray(); } public function getLibelleEtVilles(): string { $libelle = $this->getLibelle(); foreach ($this->getVilles() as $ville) { if ($ville) $libelle .= ' ( ' . $ville->getNom() . ' )'; } return $libelle; } /** @return Programme[] */ public function getProgrammes(): array { Loading module/Atelier/src/View/Helper/partial/ateliers.phtml +27 −24 Original line number Diff line number Diff line Loading @@ -40,10 +40,11 @@ foreach ($listing as $atelier) { <?php $canAfficherAtelier = $this->isAllowed(AtelierPrivileges::getResourceId(AtelierPrivileges::ATELIER_AFFICHER)); ?> <?php if ($canAfficherAtelier) : ?> <?php /** @see \Atelier\Controller\AtelierController::afficherAction() */ ?> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelle(); ?></a> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelleEtVilles(); ?></a> <?php else: ?> <?php echo $atelier->getLibelle(); ?> <?php echo $atelier->getLibelleEtVilles(); ?> <?php endif; ?> </li> <?php endforeach; ?> Loading @@ -58,12 +59,14 @@ foreach ($listing as $atelier) { <?php foreach ($ateliersByGroupes[-1] as $atelier) : ?> <li> <?php $canAfficherAtelier = $this->isAllowed(AtelierPrivileges::getResourceId(AtelierPrivileges::ATELIER_AFFICHER)); ?> <?php if ($canAfficherAtelier) : ?> <?php /** @see \Formation\Controller\AtelierController::afficherAction() */ ?> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelle(); ?></a> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelleEtVilles(); ?></a> <?php else: ?> <?php echo $atelier->getLibelle(); ?> <?php echo $atelier->getLibelleEtVilles(); ?> <?php endif; ?> </li> <?php endforeach; ?> Loading module/Etudiant/src/Service/AnneeUnivIA/AnneeUnivIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class AnneeUnivIAService */ public function getAnneeUnivIAasOptions() : array { $anneeUnivIAs = $this->getAnneeUnivIAs(); $anneeUnivIAs = $this->getAnneeUnivIAs('annee_univ'); $options = []; foreach ($anneeUnivIAs as $anneeUnivIA) { $options[$anneeUnivIA->getId()] = $anneeUnivIA->getAnneeUniv(); Loading module/Etudiant/src/Service/ComposanteIA/ComposanteIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ComposanteIAService public function getComposanteIAasOptions() : array { $composanteIAs = $this->getComposanteIAs(); $composanteIAs = $this->getComposanteIAs('composante'); $options = []; foreach ($composanteIAs as $composanteIA) { $options[$composanteIA->getId()] = $composanteIA->getComposante(); Loading module/Etudiant/src/Service/CycleIA/CycleIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class CycleIAService public function getCycleIAasOptions() : array { $cycleIAs = $this->getCycleIAs(); $cycleIAs = $this->getCycleIAs('cycle'); $options = []; foreach ($cycleIAs as $cycleIA) { $options[$cycleIA->getId()] = $cycleIA->getCycle(); Loading Loading
module/Atelier/src/Entity/Db/Atelier.php +23 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Atelier\Entity\Db; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Fichier\Entity\Db\Fichier; use Site\Entity\Db\Ville; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareInterface; use UnicaenUtilisateur\Entity\Db\HistoriqueAwareTrait; Loading Loading @@ -75,6 +76,28 @@ class Atelier implements HistoriqueAwareInterface return $this->sessions->toArray(); } /** @return Ville[] */ public function getVilles(): array { $villes = new ArrayCollection(); foreach ($this->getSessions() as $session) { $ville = $session->getSite()?->getVille(); if($ville and !$villes->contains($ville)) $villes[] = $ville; } return $villes->toArray(); } public function getLibelleEtVilles(): string { $libelle = $this->getLibelle(); foreach ($this->getVilles() as $ville) { if ($ville) $libelle .= ' ( ' . $ville->getNom() . ' )'; } return $libelle; } /** @return Programme[] */ public function getProgrammes(): array { Loading
module/Atelier/src/View/Helper/partial/ateliers.phtml +27 −24 Original line number Diff line number Diff line Loading @@ -40,10 +40,11 @@ foreach ($listing as $atelier) { <?php $canAfficherAtelier = $this->isAllowed(AtelierPrivileges::getResourceId(AtelierPrivileges::ATELIER_AFFICHER)); ?> <?php if ($canAfficherAtelier) : ?> <?php /** @see \Atelier\Controller\AtelierController::afficherAction() */ ?> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelle(); ?></a> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelleEtVilles(); ?></a> <?php else: ?> <?php echo $atelier->getLibelle(); ?> <?php echo $atelier->getLibelleEtVilles(); ?> <?php endif; ?> </li> <?php endforeach; ?> Loading @@ -58,12 +59,14 @@ foreach ($listing as $atelier) { <?php foreach ($ateliersByGroupes[-1] as $atelier) : ?> <li> <?php $canAfficherAtelier = $this->isAllowed(AtelierPrivileges::getResourceId(AtelierPrivileges::ATELIER_AFFICHER)); ?> <?php if ($canAfficherAtelier) : ?> <?php /** @see \Formation\Controller\AtelierController::afficherAction() */ ?> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelle(); ?></a> <a href="<?php echo $this->url('atelier/atelier/afficher', ['atelier' => $atelier->getId()], [], true); ?>" class="ajax-modal"> <?php echo $atelier->getLibelleEtVilles(); ?></a> <?php else: ?> <?php echo $atelier->getLibelle(); ?> <?php echo $atelier->getLibelleEtVilles(); ?> <?php endif; ?> </li> <?php endforeach; ?> Loading
module/Etudiant/src/Service/AnneeUnivIA/AnneeUnivIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -80,7 +80,7 @@ class AnneeUnivIAService */ public function getAnneeUnivIAasOptions() : array { $anneeUnivIAs = $this->getAnneeUnivIAs(); $anneeUnivIAs = $this->getAnneeUnivIAs('annee_univ'); $options = []; foreach ($anneeUnivIAs as $anneeUnivIA) { $options[$anneeUnivIA->getId()] = $anneeUnivIA->getAnneeUniv(); Loading
module/Etudiant/src/Service/ComposanteIA/ComposanteIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class ComposanteIAService public function getComposanteIAasOptions() : array { $composanteIAs = $this->getComposanteIAs(); $composanteIAs = $this->getComposanteIAs('composante'); $options = []; foreach ($composanteIAs as $composanteIA) { $options[$composanteIA->getId()] = $composanteIA->getComposante(); Loading
module/Etudiant/src/Service/CycleIA/CycleIAService.php +1 −1 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ class CycleIAService public function getCycleIAasOptions() : array { $cycleIAs = $this->getCycleIAs(); $cycleIAs = $this->getCycleIAs('cycle'); $options = []; foreach ($cycleIAs as $cycleIA) { $options[$cycleIA->getId()] = $cycleIA->getCycle(); Loading