Loading module/Fichier/src/Fichier/Form/ViewHelper/Fichier/form-fichier-remplacable.phtml +1 −0 Changes for module/Fichier/src/Fichier/Form/ViewHelper/Fichier/form-fichier-remplacable.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ $hash = uniqid(); <strong><?= $form->get($fichierElementName)->getLabel() ?></strong> <?php echo $this->fichier($fichier) ->setIsTargetBlank(true) ->setUrlTelechargementFichier($canConsulterFichier ? $this->urlFichier($fichier)->telechargerFichier($fichier) : null) ->setShowHistoInfo(); ?> Loading module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleFichierController.php +3 −8 Changes for module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleFichierController.php: 3 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -40,7 +40,9 @@ class TheseCotutelleFichierController extends AbstractController public function modifierAction(): Response|ViewModel { $this->theseCotutelleFichier = $this->getRequestedTheseCotutelleFichier(); $this->theseCotutelle = $this->theseCotutelleFichier->getTheseCotutelle(); $this->theseCotutelle = $this->theseCotutelleService->getRepository()->find( // refetch avec jointures $this->theseCotutelleFichier->getTheseCotutelle()->getId() ); return $this->ajouterModifier(); } Loading @@ -60,13 +62,6 @@ class TheseCotutelleFichierController extends AbstractController if ($this->theseCotutelleFichierForm->isValid()) { try { $this->saveTheseCotutelleFichier(); // en cas de remplacement du fichier, suppression du fichier précédent if (($fichierPrecId = $data[$this->theseCotutelleFichierForm->getFichierHiddenElementName()] ?? null) && $fichierPrecId !== $this->theseCotutelleFichier->getFichier()->getId()) { /** @var \Fichier\Entity\Db\Fichier $fichierPrec */ $fichierPrec = $this->fichierService->getRepository()->find($fichierPrecId); $this->fichierService->supprimerFichiers([$fichierPrec]); } $this->flashMessenger()->addSuccessMessage(sprintf( "Le document pour la cotutelle de thèse de %s a été enregistré avec succès.", $this->theseCotutelle->getThese()->getDoctorant() Loading module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleInscriptionController.php +2 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleInscriptionController.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ class TheseCotutelleInscriptionController extends AbstractController public function supprimerAction(): Response { $this->theseCotutelleInscription = $this->getRequestedTheseCotutelleInscription(); $this->theseCotutelle = $this->theseCotutelleInscription->getTheseCotutelle(); $this->theseCotutelleInscription->historiser($this->userContextService->getDbUser()); Loading Loading @@ -137,7 +138,7 @@ class TheseCotutelleInscriptionController extends AbstractController private function getRequestedTheseCotutelleInscription(): TheseCotutelleInscription { /** @var \TheseCotutelle\Entity\Db\TheseCotutelleInscription $theseCotutelleInscription */ $theseCotutelleInscription = $this->theseCotutelleInscriptionService->getRepository()->find($this->params('these-cotutelle-inscription')); $theseCotutelleInscription = $this->theseCotutelleInscriptionService->getRepository()->find($this->params('theseCotutelleInscription')); Assert::notNull($theseCotutelleInscription); return $theseCotutelleInscription; } Loading module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Mapping/TheseCotutelle.Entity.Db.TheseCotutelleInscription.dcm.xml +1 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Mapping/TheseCotutelle.Entity.Db.TheseCotutelleInscription.dcm.xml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ <join-column name="etablissement_id" referenced-column-name="id"/> </join-columns> </many-to-one> <many-to-one field="justifInscriptionFichier" target-entity="Fichier\Entity\Db\Fichier"> <many-to-one field="fichier" target-entity="Fichier\Entity\Db\Fichier"> <join-columns> <join-column name="justificatif_inscription_fichier_id" referenced-column-name="id"/> </join-columns> Loading module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Repository/TheseCotutelleRepository.php +1 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Repository/TheseCotutelleRepository.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class TheseCotutelleRepository extends DefaultEntityRepository $qb ->leftJoin('cotut.inscriptions', 'i', Join::WITH, 'i.histoDestruction is null')->addSelect('i') ->leftJoin('i.etablissement', 'ie')->addSelect('ie') ->leftJoin('i.justifInscriptionFichier', 'if')->addSelect('if'); ->leftJoin('i.fichier', 'if')->addSelect('if'); $qb ->leftJoin('cotut.presences', 'p', Join::WITH, 'p.histoDestruction is null')->addSelect('p') ->leftJoin('p.etablissement', 'pe')->addSelect('pe') Loading Loading
module/Fichier/src/Fichier/Form/ViewHelper/Fichier/form-fichier-remplacable.phtml +1 −0 Changes for module/Fichier/src/Fichier/Form/ViewHelper/Fichier/form-fichier-remplacable.phtml: 1 added line, 0 removed lines. Original line number Diff line number Diff line Loading @@ -32,6 +32,7 @@ $hash = uniqid(); <strong><?= $form->get($fichierElementName)->getLabel() ?></strong> <?php echo $this->fichier($fichier) ->setIsTargetBlank(true) ->setUrlTelechargementFichier($canConsulterFichier ? $this->urlFichier($fichier)->telechargerFichier($fichier) : null) ->setShowHistoInfo(); ?> Loading
module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleFichierController.php +3 −8 Changes for module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleFichierController.php: 3 added lines, 8 removed lines. Original line number Diff line number Diff line Loading @@ -40,7 +40,9 @@ class TheseCotutelleFichierController extends AbstractController public function modifierAction(): Response|ViewModel { $this->theseCotutelleFichier = $this->getRequestedTheseCotutelleFichier(); $this->theseCotutelle = $this->theseCotutelleFichier->getTheseCotutelle(); $this->theseCotutelle = $this->theseCotutelleService->getRepository()->find( // refetch avec jointures $this->theseCotutelleFichier->getTheseCotutelle()->getId() ); return $this->ajouterModifier(); } Loading @@ -60,13 +62,6 @@ class TheseCotutelleFichierController extends AbstractController if ($this->theseCotutelleFichierForm->isValid()) { try { $this->saveTheseCotutelleFichier(); // en cas de remplacement du fichier, suppression du fichier précédent if (($fichierPrecId = $data[$this->theseCotutelleFichierForm->getFichierHiddenElementName()] ?? null) && $fichierPrecId !== $this->theseCotutelleFichier->getFichier()->getId()) { /** @var \Fichier\Entity\Db\Fichier $fichierPrec */ $fichierPrec = $this->fichierService->getRepository()->find($fichierPrecId); $this->fichierService->supprimerFichiers([$fichierPrec]); } $this->flashMessenger()->addSuccessMessage(sprintf( "Le document pour la cotutelle de thèse de %s a été enregistré avec succès.", $this->theseCotutelle->getThese()->getDoctorant() Loading
module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleInscriptionController.php +2 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Controller/TheseCotutelleInscriptionController.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -93,6 +93,7 @@ class TheseCotutelleInscriptionController extends AbstractController public function supprimerAction(): Response { $this->theseCotutelleInscription = $this->getRequestedTheseCotutelleInscription(); $this->theseCotutelle = $this->theseCotutelleInscription->getTheseCotutelle(); $this->theseCotutelleInscription->historiser($this->userContextService->getDbUser()); Loading Loading @@ -137,7 +138,7 @@ class TheseCotutelleInscriptionController extends AbstractController private function getRequestedTheseCotutelleInscription(): TheseCotutelleInscription { /** @var \TheseCotutelle\Entity\Db\TheseCotutelleInscription $theseCotutelleInscription */ $theseCotutelleInscription = $this->theseCotutelleInscriptionService->getRepository()->find($this->params('these-cotutelle-inscription')); $theseCotutelleInscription = $this->theseCotutelleInscriptionService->getRepository()->find($this->params('theseCotutelleInscription')); Assert::notNull($theseCotutelleInscription); return $theseCotutelleInscription; } Loading
module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Mapping/TheseCotutelle.Entity.Db.TheseCotutelleInscription.dcm.xml +1 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Mapping/TheseCotutelle.Entity.Db.TheseCotutelleInscription.dcm.xml: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ <join-column name="etablissement_id" referenced-column-name="id"/> </join-columns> </many-to-one> <many-to-one field="justifInscriptionFichier" target-entity="Fichier\Entity\Db\Fichier"> <many-to-one field="fichier" target-entity="Fichier\Entity\Db\Fichier"> <join-columns> <join-column name="justificatif_inscription_fichier_id" referenced-column-name="id"/> </join-columns> Loading
module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Repository/TheseCotutelleRepository.php +1 −1 Changes for module/TheseCotutelle/src/TheseCotutelle/Entity/Db/Repository/TheseCotutelleRepository.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ class TheseCotutelleRepository extends DefaultEntityRepository $qb ->leftJoin('cotut.inscriptions', 'i', Join::WITH, 'i.histoDestruction is null')->addSelect('i') ->leftJoin('i.etablissement', 'ie')->addSelect('ie') ->leftJoin('i.justifInscriptionFichier', 'if')->addSelect('if'); ->leftJoin('i.fichier', 'if')->addSelect('if'); $qb ->leftJoin('cotut.presences', 'p', Join::WITH, 'p.histoDestruction is null')->addSelect('p') ->leftJoin('p.etablissement', 'pe')->addSelect('pe') Loading