Loading module/Application/view/application/index/partial/informations.phtml +21 −8 Original line number Diff line number Diff line Loading @@ -2,33 +2,46 @@ /** * @var Information[] $informations * @var InformationLangue[] $langues **/ $langues = []; foreach ($informations as $information) $langues[$information->getLangue()->getId()] = $information->getLangue(); use Information\Entity\Db\Information; use Information\Entity\Db\InformationLangue; ?> <ul class="menu-actualites nav nav-pills nav-stacked" style="padding: 1rem;"> <span class="langue" id="FR">FR</span> | <span class="langue" id="EN">EN</span> <ul class="nav nav-pills nav-stacked menu-secondaire informations"> <?php foreach ($langues as $langue) : ?> <span class="flag langue" id="<?php echo $langue->getId(); ?>"> <img src="<?php echo $langue->getDrapeau(); ?>" style="width: 30px;"> </span> <?php endforeach; ?> <ul class="nav nav-pills nav-stacked informations"> <?php foreach ($informations as $information) : ?> <li class="<?php echo $information->getLangue(); ?>"> <li class="<?php echo $information->getLangue()->getId(); ?>"> <a href="<?php echo $this->url('informations/afficher', ['id' => $information->getId()], [], true); ?>"> <?php echo $information->getTitre(); ?> </a> </li> <?php endforeach; ?> </ul> </ul> <style> .selected { font-weight: bold; color: #0a3783; border: 3px solid #337ab7; background: #337ab7; } .flag { height: 30px; display: inline-block; margin: 5px; } .langue { Loading module/Application/view/application/index/partial/sujet-de-these.phtml +3 −2 Original line number Diff line number Diff line Loading @@ -6,10 +6,11 @@ ?> <ul class="menu-actualites nav nav-pills nav-stacked" style="padding: 1rem;"> <br/> <ul class="nav nav-pills nav-stacked menu-secondaire" style="padding: 1rem;"> <strong>Offre de thèses</strong> <ul> <?php foreach ($offre as $theme => $lien) : ?> <li> <?php if ($lien) : ?> Loading module/Information/config/module.config.php +8 −3 Original line number Diff line number Diff line Loading @@ -3,15 +3,19 @@ use Application\Entity\Db\Repository\DefaultEntityRepository; use Application\Provider\Privilege\FichierPrivileges; use Information\Controller\FichierController; use Information\Controller\FichierControllerFactory; use Information\Controller\InformationController; use Information\Controller\InformationControllerFactory; use Information\Form\FichierForm; use Information\Form\InformationForm; use Information\Form\InformationFormFactory; use Information\Form\InformationHydrator; use Information\Form\InformationHydratorFactory; use Information\Provider\Privilege\InformationPrivileges; use Information\Service\InformationFichierService; use Information\Service\InformationFichierServiceFactory; use Information\Service\InformationLangue\InformationLangueService; use Information\Service\InformationLangue\InformationLangueServiceFactory; use Information\Service\InformationService; use Information\Service\InformationServiceFactory; use UnicaenAuth\Guard\PrivilegeController; Loading Loading @@ -279,13 +283,14 @@ return [ 'factories' => [ InformationService::class => InformationServiceFactory::class, InformationFichierService::class => InformationFichierServiceFactory::class, InformationLangueService::class => InformationLangueServiceFactory::class ], ], 'controllers' => [ 'factories' => [ InformationController::class => InformationControllerFactory::class, FichierController::class => \Information\Controller\FichierControllerFactory::class, FichierController::class => FichierControllerFactory::class, ], ], 'form_elements' => [ Loading @@ -297,8 +302,8 @@ return [ ], ], 'hydrators' => [ 'invokables' => [ InformationHydrator::class => InformationHydrator::class 'factories' => [ InformationHydrator::class => InformationHydratorFactory::class ] ], 'view_manager' => [ Loading module/Information/src/Information/Entity/Db/Information.php +5 −5 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class Information implements HistoriqueAwareInterface private $priorite; /** @var boolean */ private $visible; /** @var string */ /** @var InformationLangue */ private $langue; /** Loading Loading @@ -122,17 +122,17 @@ class Information implements HistoriqueAwareInterface } /** * @return string * @return InformationLangue */ public function getLangue(): string public function getLangue(): InformationLangue { return $this->langue; } /** * @param string $langue * @param InformationLangue $langue */ public function setLangue(string $langue): void public function setLangue(InformationLangue $langue): void { $this->langue = $langue; } Loading module/Information/src/Information/Entity/Db/InformationLangue.php 0 → 100644 +39 −0 Original line number Diff line number Diff line <?php namespace Information\Entity\Db; class InformationLangue { /** @var string */ private $id; /** @var string */ private $libelle; /** @var string */ private $drapeau; /** * @return string */ public function getId(): string { return $this->id; } /** * @return string */ public function getLibelle(): string { return $this->libelle; } /** * @return string */ public function getDrapeau(): string { return $this->drapeau; } } No newline at end of file Loading
module/Application/view/application/index/partial/informations.phtml +21 −8 Original line number Diff line number Diff line Loading @@ -2,33 +2,46 @@ /** * @var Information[] $informations * @var InformationLangue[] $langues **/ $langues = []; foreach ($informations as $information) $langues[$information->getLangue()->getId()] = $information->getLangue(); use Information\Entity\Db\Information; use Information\Entity\Db\InformationLangue; ?> <ul class="menu-actualites nav nav-pills nav-stacked" style="padding: 1rem;"> <span class="langue" id="FR">FR</span> | <span class="langue" id="EN">EN</span> <ul class="nav nav-pills nav-stacked menu-secondaire informations"> <?php foreach ($langues as $langue) : ?> <span class="flag langue" id="<?php echo $langue->getId(); ?>"> <img src="<?php echo $langue->getDrapeau(); ?>" style="width: 30px;"> </span> <?php endforeach; ?> <ul class="nav nav-pills nav-stacked informations"> <?php foreach ($informations as $information) : ?> <li class="<?php echo $information->getLangue(); ?>"> <li class="<?php echo $information->getLangue()->getId(); ?>"> <a href="<?php echo $this->url('informations/afficher', ['id' => $information->getId()], [], true); ?>"> <?php echo $information->getTitre(); ?> </a> </li> <?php endforeach; ?> </ul> </ul> <style> .selected { font-weight: bold; color: #0a3783; border: 3px solid #337ab7; background: #337ab7; } .flag { height: 30px; display: inline-block; margin: 5px; } .langue { Loading
module/Application/view/application/index/partial/sujet-de-these.phtml +3 −2 Original line number Diff line number Diff line Loading @@ -6,10 +6,11 @@ ?> <ul class="menu-actualites nav nav-pills nav-stacked" style="padding: 1rem;"> <br/> <ul class="nav nav-pills nav-stacked menu-secondaire" style="padding: 1rem;"> <strong>Offre de thèses</strong> <ul> <?php foreach ($offre as $theme => $lien) : ?> <li> <?php if ($lien) : ?> Loading
module/Information/config/module.config.php +8 −3 Original line number Diff line number Diff line Loading @@ -3,15 +3,19 @@ use Application\Entity\Db\Repository\DefaultEntityRepository; use Application\Provider\Privilege\FichierPrivileges; use Information\Controller\FichierController; use Information\Controller\FichierControllerFactory; use Information\Controller\InformationController; use Information\Controller\InformationControllerFactory; use Information\Form\FichierForm; use Information\Form\InformationForm; use Information\Form\InformationFormFactory; use Information\Form\InformationHydrator; use Information\Form\InformationHydratorFactory; use Information\Provider\Privilege\InformationPrivileges; use Information\Service\InformationFichierService; use Information\Service\InformationFichierServiceFactory; use Information\Service\InformationLangue\InformationLangueService; use Information\Service\InformationLangue\InformationLangueServiceFactory; use Information\Service\InformationService; use Information\Service\InformationServiceFactory; use UnicaenAuth\Guard\PrivilegeController; Loading Loading @@ -279,13 +283,14 @@ return [ 'factories' => [ InformationService::class => InformationServiceFactory::class, InformationFichierService::class => InformationFichierServiceFactory::class, InformationLangueService::class => InformationLangueServiceFactory::class ], ], 'controllers' => [ 'factories' => [ InformationController::class => InformationControllerFactory::class, FichierController::class => \Information\Controller\FichierControllerFactory::class, FichierController::class => FichierControllerFactory::class, ], ], 'form_elements' => [ Loading @@ -297,8 +302,8 @@ return [ ], ], 'hydrators' => [ 'invokables' => [ InformationHydrator::class => InformationHydrator::class 'factories' => [ InformationHydrator::class => InformationHydratorFactory::class ] ], 'view_manager' => [ Loading
module/Information/src/Information/Entity/Db/Information.php +5 −5 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ class Information implements HistoriqueAwareInterface private $priorite; /** @var boolean */ private $visible; /** @var string */ /** @var InformationLangue */ private $langue; /** Loading Loading @@ -122,17 +122,17 @@ class Information implements HistoriqueAwareInterface } /** * @return string * @return InformationLangue */ public function getLangue(): string public function getLangue(): InformationLangue { return $this->langue; } /** * @param string $langue * @param InformationLangue $langue */ public function setLangue(string $langue): void public function setLangue(InformationLangue $langue): void { $this->langue = $langue; } Loading
module/Information/src/Information/Entity/Db/InformationLangue.php 0 → 100644 +39 −0 Original line number Diff line number Diff line <?php namespace Information\Entity\Db; class InformationLangue { /** @var string */ private $id; /** @var string */ private $libelle; /** @var string */ private $drapeau; /** * @return string */ public function getId(): string { return $this->id; } /** * @return string */ public function getLibelle(): string { return $this->libelle; } /** * @return string */ public function getDrapeau(): string { return $this->drapeau; } } No newline at end of file