Loading module/Soutenance/src/Soutenance/Controller/IndexController.php +5 −0 Changes for module/Soutenance/src/Soutenance/Controller/IndexController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -130,13 +130,16 @@ class IndexController extends AbstractController $role = $this->userContextService->getSelectedIdentityRole(); $propositions = $this->getPropositionService()->getPropositionsByRole($role); $etablissementId = $this->params()->fromQuery('etablissement'); $ecoleDoctoraleId = $this->params()->fromQuery('ecoledoctorale'); $uniteRechercheId = $this->params()->fromQuery('uniterecherche'); $etatId = $this->params()->fromQuery('etat'); if ($etablissementId != '') $propositions = array_filter($propositions, function($proposition) use ($etablissementId) { return $proposition->getThese()->getEtablissement()->getId() == $etablissementId; }); if ($ecoleDoctoraleId != '') $propositions = array_filter($propositions, function($proposition) use ($ecoleDoctoraleId) { return $proposition->getThese()->getEcoleDoctorale()->getId() == $ecoleDoctoraleId; }); if ($uniteRechercheId != '') $propositions = array_filter($propositions, function($proposition) use ($uniteRechercheId) { return $proposition->getThese()->getUniteRecherche()->getId() == $uniteRechercheId; }); if ($etatId != '') $propositions = array_filter($propositions, function($proposition) use ($etatId) { return $proposition->getEtat()->getId() == $etatId; }); return new ViewModel([ 'propositions' => $propositions, Loading @@ -145,9 +148,11 @@ class IndexController extends AbstractController 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId, 'etatId' => $etatId, 'etablissements' => $this->getEtablissementService()->getRepository()->findAllEtablissementsMembres(), 'ecoles' => $this->getEcoleDoctoraleService()->getRepository()->findAll(true), 'unites' => $this->getUniteRechercheService()->getRepository()->findAll(true), 'etats' => $this->getPropositionService()->getPropositionEtats(), ]); } } No newline at end of file module/Soutenance/src/Soutenance/Service/Proposition/PropositionService.php +14 −0 Changes for module/Soutenance/src/Soutenance/Service/Proposition/PropositionService.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -588,6 +588,20 @@ class PropositionService { /** PROPOSTITION ETAT ********************************************************************************************/ /** * @return Etat[] */ public function getPropositionEtats() : array { $qb = $this->getEntityManager()->getRepository(Etat::class)->createQueryBuilder('etat') ->orderBy('etat.id') ; $result = $qb->getQuery()->getResult(); return $result; } /** * @param string $code * @return Etat Loading module/Soutenance/view/soutenance/index/index-structure.phtml +5 −2 Changes for module/Soutenance/view/soutenance/index/index-structure.phtml: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,9 +7,11 @@ * @var Etablissement[] $etablissements * @var EcoleDoctorale[] $ecoles * @var UniteRecherche[] $unites * @var Etat[] $etats * @var integer $etablissementId * @var integer $ecoleDoctoraleId * @var integer $uniteRechercheId * @var integer $etatId */ use Application\Entity\Db\EcoleDoctorale; Loading @@ -18,6 +20,7 @@ use Application\Entity\Db\Role; use Application\Entity\Db\These; use Application\Entity\Db\UniteRecherche; use Application\Provider\Privilege\ThesePrivileges; use Soutenance\Entity\Etat; use Soutenance\Entity\Proposition; $canVoirThese = $this->isAllowed(ThesePrivileges::getResourceId(ThesePrivileges::THESE_CONSULTATION_FICHE)); Loading @@ -32,8 +35,8 @@ $canSuppression = ($role->getCode() === Role::CODE_ADMIN_TECH); </h1> <?php echo $this->partial('partial/filtre-proposition', ['etablissements' => $etablissements, 'ecoles' => $ecoles, 'unites' => $unites, 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId ]); ?> ['etablissements' => $etablissements, 'ecoles' => $ecoles, 'unites' => $unites, 'etats' => $etats, 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId, 'etatId' => $etatId ]); ?> <table class="table table-condensed"> <thead> Loading module/Soutenance/view/soutenance/index/partial/filtre-proposition.phtml +8 −0 Changes for module/Soutenance/view/soutenance/index/partial/filtre-proposition.phtml: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,14 +3,17 @@ * @var Etablissement[] $etablissements * @var EcoleDoctorale[] $ecoles * @var UniteRecherche[] $unites * @var Etat[] $etats * @var integer $etablissementId * @var integer $ecoleDoctoraleId * @var integer $uniteRechercheId * @var integer $etatId */ use Application\Entity\Db\EcoleDoctorale; use Application\Entity\Db\Etablissement; use Application\Entity\Db\UniteRecherche; use Soutenance\Entity\Etat; ?> Loading Loading @@ -59,6 +62,11 @@ use Application\Entity\Db\UniteRecherche; <label for="etat">Etat : </label> <select id="etat" name="etat" class="selectpicker" data-live-search="true"> <option value="">Tous les etats </option> <?php foreach ($etats as $etat) : ?> <option value="<?php echo $etat->getId(); ?>" <?php if ($etat->getId() == $etatId) echo " selected "; ?>> <?php echo $etat->getLibelle(); ?> </option> <?php endforeach; ?> </select> </div> Loading Loading
module/Soutenance/src/Soutenance/Controller/IndexController.php +5 −0 Changes for module/Soutenance/src/Soutenance/Controller/IndexController.php: 5 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -130,13 +130,16 @@ class IndexController extends AbstractController $role = $this->userContextService->getSelectedIdentityRole(); $propositions = $this->getPropositionService()->getPropositionsByRole($role); $etablissementId = $this->params()->fromQuery('etablissement'); $ecoleDoctoraleId = $this->params()->fromQuery('ecoledoctorale'); $uniteRechercheId = $this->params()->fromQuery('uniterecherche'); $etatId = $this->params()->fromQuery('etat'); if ($etablissementId != '') $propositions = array_filter($propositions, function($proposition) use ($etablissementId) { return $proposition->getThese()->getEtablissement()->getId() == $etablissementId; }); if ($ecoleDoctoraleId != '') $propositions = array_filter($propositions, function($proposition) use ($ecoleDoctoraleId) { return $proposition->getThese()->getEcoleDoctorale()->getId() == $ecoleDoctoraleId; }); if ($uniteRechercheId != '') $propositions = array_filter($propositions, function($proposition) use ($uniteRechercheId) { return $proposition->getThese()->getUniteRecherche()->getId() == $uniteRechercheId; }); if ($etatId != '') $propositions = array_filter($propositions, function($proposition) use ($etatId) { return $proposition->getEtat()->getId() == $etatId; }); return new ViewModel([ 'propositions' => $propositions, Loading @@ -145,9 +148,11 @@ class IndexController extends AbstractController 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId, 'etatId' => $etatId, 'etablissements' => $this->getEtablissementService()->getRepository()->findAllEtablissementsMembres(), 'ecoles' => $this->getEcoleDoctoraleService()->getRepository()->findAll(true), 'unites' => $this->getUniteRechercheService()->getRepository()->findAll(true), 'etats' => $this->getPropositionService()->getPropositionEtats(), ]); } } No newline at end of file
module/Soutenance/src/Soutenance/Service/Proposition/PropositionService.php +14 −0 Changes for module/Soutenance/src/Soutenance/Service/Proposition/PropositionService.php: 14 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -588,6 +588,20 @@ class PropositionService { /** PROPOSTITION ETAT ********************************************************************************************/ /** * @return Etat[] */ public function getPropositionEtats() : array { $qb = $this->getEntityManager()->getRepository(Etat::class)->createQueryBuilder('etat') ->orderBy('etat.id') ; $result = $qb->getQuery()->getResult(); return $result; } /** * @param string $code * @return Etat Loading
module/Soutenance/view/soutenance/index/index-structure.phtml +5 −2 Changes for module/Soutenance/view/soutenance/index/index-structure.phtml: 5 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -7,9 +7,11 @@ * @var Etablissement[] $etablissements * @var EcoleDoctorale[] $ecoles * @var UniteRecherche[] $unites * @var Etat[] $etats * @var integer $etablissementId * @var integer $ecoleDoctoraleId * @var integer $uniteRechercheId * @var integer $etatId */ use Application\Entity\Db\EcoleDoctorale; Loading @@ -18,6 +20,7 @@ use Application\Entity\Db\Role; use Application\Entity\Db\These; use Application\Entity\Db\UniteRecherche; use Application\Provider\Privilege\ThesePrivileges; use Soutenance\Entity\Etat; use Soutenance\Entity\Proposition; $canVoirThese = $this->isAllowed(ThesePrivileges::getResourceId(ThesePrivileges::THESE_CONSULTATION_FICHE)); Loading @@ -32,8 +35,8 @@ $canSuppression = ($role->getCode() === Role::CODE_ADMIN_TECH); </h1> <?php echo $this->partial('partial/filtre-proposition', ['etablissements' => $etablissements, 'ecoles' => $ecoles, 'unites' => $unites, 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId ]); ?> ['etablissements' => $etablissements, 'ecoles' => $ecoles, 'unites' => $unites, 'etats' => $etats, 'etablissementId' => $etablissementId, 'ecoleDoctoraleId' => $ecoleDoctoraleId, 'uniteRechercheId' => $uniteRechercheId, 'etatId' => $etatId ]); ?> <table class="table table-condensed"> <thead> Loading
module/Soutenance/view/soutenance/index/partial/filtre-proposition.phtml +8 −0 Changes for module/Soutenance/view/soutenance/index/partial/filtre-proposition.phtml: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -3,14 +3,17 @@ * @var Etablissement[] $etablissements * @var EcoleDoctorale[] $ecoles * @var UniteRecherche[] $unites * @var Etat[] $etats * @var integer $etablissementId * @var integer $ecoleDoctoraleId * @var integer $uniteRechercheId * @var integer $etatId */ use Application\Entity\Db\EcoleDoctorale; use Application\Entity\Db\Etablissement; use Application\Entity\Db\UniteRecherche; use Soutenance\Entity\Etat; ?> Loading Loading @@ -59,6 +62,11 @@ use Application\Entity\Db\UniteRecherche; <label for="etat">Etat : </label> <select id="etat" name="etat" class="selectpicker" data-live-search="true"> <option value="">Tous les etats </option> <?php foreach ($etats as $etat) : ?> <option value="<?php echo $etat->getId(); ?>" <?php if ($etat->getId() == $etatId) echo " selected "; ?>> <?php echo $etat->getLibelle(); ?> </option> <?php endforeach; ?> </select> </div> Loading