Loading module/Application/src/Application/Controller/Factory/TheseControllerFactory.php +4 −0 Changes for module/Application/src/Application/Controller/Factory/TheseControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Controller\Factory; use Application\Controller\TheseController; use Application\Service\Etablissement\EtablissementService; use Application\Service\Fichier\FichierService; use Application\Service\MailConfirmationService; use Application\Service\Notification\NotificationService; use Application\Service\Role\RoleService; use Application\Service\These\TheseService; Loading Loading @@ -38,6 +39,7 @@ class TheseControllerFactory * @var WorkflowService $workflowService * @var NotificationService $notificationService * @var EtablissementService $etablissementService * @var MailConfirmationService $mailConfirmationService * @var EntityManager $entityManager */ $variableService = $controllerManager->getServiceLocator()->get('VariableService'); Loading @@ -48,6 +50,7 @@ class TheseControllerFactory $fichierService = $controllerManager->getServiceLocator()->get('FichierService'); $workflowService = $controllerManager->getServiceLocator()->get('WorkflowService'); $etablissementService = $controllerManager->getServiceLocator()->get('EtablissementService'); $mailConfirmationService = $controllerManager->getServiceLocator()->get('MailConfirmationService'); $entityManager = $controllerManager->getServiceLocator()->get('doctrine.entitymanager.orm_default'); $controller = new TheseController(); Loading @@ -60,6 +63,7 @@ class TheseControllerFactory $controller->setFichierService($fichierService); $controller->setWorkflowService($workflowService); $controller->setEtablissementService($etablissementService); $controller->setMailConfirmationService($mailConfirmationService); $controller->setEntityManager($entityManager); return $controller; Loading module/Application/src/Application/Controller/TheseController.php +35 −1 Changes for module/Application/src/Application/Controller/TheseController.php: 35 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Application\Entity\Db\Attestation; use Application\Entity\Db\Diffusion; use Application\Entity\Db\Etablissement; use Application\Entity\Db\Fichier; use Application\Entity\Db\MailConfirmation; use Application\Entity\Db\MetadonneeThese; use Application\Entity\Db\NatureFichier; use Application\Entity\Db\RdvBu; Loading @@ -26,6 +27,7 @@ use Application\Form\RdvBuTheseForm; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Fichier\Exception\ValidationImpossibleException; use Application\Service\Fichier\FichierServiceAwareTrait; use Application\Service\MailConfirmationService; use Application\Service\Notification\NotificationServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Application\Service\These\Convention\ConventionPdfExporter; Loading @@ -47,6 +49,8 @@ use Zend\Form\Element\Hidden; use Zend\Http\Response; use Zend\Stdlib\ParametersInterface; use Zend\View\Model\ViewModel; use Application\Entity\Db\Individu; use Application\Service\MailConfirmationServiceAwareTrait; class TheseController extends AbstractController { Loading @@ -62,6 +66,7 @@ class TheseController extends AbstractController use IdifyFilterAwareTrait; use EtablissementServiceAwareTrait; use EntityManagerAwareTrait; use MailConfirmationServiceAwareTrait; private $timeoutRetraitement; Loading Loading @@ -217,12 +222,39 @@ class TheseController extends AbstractController $these->getCorrectionAutorisee() && count($this->validationService->getValidationsAttenduesPourCorrectionThese($these)) > 0; /** * @var Individu $individu * @var MailConfirmation $enCours * @var MailConfirmation $confirmee */ $individu = $these->getDoctorant()->getIndividu(); $enCours = $this->mailConfirmationService->getDemandeEnCoursByIndividu($individu); $confirmee = $this->mailConfirmationService->getDemandeConfirmeeByIndividu($individu); $mailContact = null; $etatMailContact = null; switch(true) { case($enCours !== null) : $mailContact = $enCours->getEmail(); $etatMailContact = MailConfirmation::ENVOYER; break; case($confirmee !== null) : $mailContact = $confirmee->getEmail(); $etatMailContact = MailConfirmation::CONFIRMER; break; } //TODO JP remplacer dans modifierPersopassUrl(); $urlModification = $this->url()->fromRoute('doctorant/modifier-persopass',['back' => 1, 'doctorant' => $these->getDoctorant()->getId()], [], true); $view = new ViewModel([ 'these' => $these, 'etablissement' => $etablissement, 'estDoctorant' => (bool)$this->userContextService->getSelectedRoleDoctorant(), 'showCorrecAttendue' => $showCorrecAttendue, 'modifierPersopassUrl' => $this->urlDoctorant()->modifierPersopassUrl($these), // 'modifierPersopassUrl' => $this->urlDoctorant()->modifierPersopassUrl($these), 'modifierPersopassUrl' => $urlModification, 'pvSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_PV_SOUTENANCE), 'rapportSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_RAPPORT_SOUTENANCE), 'preRapportSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_PRE_RAPPORT_SOUTENANCE), Loading @@ -233,6 +265,8 @@ class TheseController extends AbstractController 'nextStepUrl' => $this->urlWorkflow()->nextStepBox($these, null, [ WfEtape::PSEUDO_ETAPE_FINALE, ]), 'mailContact' => $mailContact, 'etatMailContact' => $etatMailContact, ]); $view->setTemplate('application/these/identite'); Loading module/Application/src/Application/Service/MailConfirmationServiceAwareTrait.php 0 → 100644 +22 −0 Changes for module/Application/src/Application/Service/MailConfirmationServiceAwareTrait.php: 22 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Service; trait MailConfirmationServiceAwareTrait { /** * @var MailConfirmationService */ private $mailConfirmationService; /** * @param MailConfirmationService $service * @return self */ public function setMailConfirmationService(MailConfirmationService $service) { $this->mailConfirmationService = $service; return $this; } } No newline at end of file module/Application/view/application/these/identite.phtml +26 −11 Changes for module/Application/view/application/these/identite.phtml: 26 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Application\Filter\ActeursFormatter; use Application\Entity\Db\WfEtape; use Application\Provider\Privilege\DoctorantPrivileges; use Application\View\Renderer\PhpRenderer; use Application\Entity\Db\MailConfirmation; /** * @var $this PhpRenderer Loading @@ -23,6 +24,8 @@ use Application\View\Renderer\PhpRenderer; * @var string $convMiseEnLigneUrl * @var string $avenantConvMiseEnLigneUrl * @var string $nextStepUrl * @var string $mailContact * @var string $etatMailContact */ $canEditPersopass = $this->isAllowed($these, DoctorantPrivileges::DOCTORANT_MODIFICATION_PERSOPASS); Loading Loading @@ -74,9 +77,28 @@ $persopassModifiedEvent = 'persopass-modified-event'; <?php echo $these->getDoctorant()->getSourceCode() ?> <br> <strong> <?php echo $this->translate("PersoP@ss :"); ?> <?php echo $this->translate("Mail :"); ?> </strong> <?php if ($email = $these->getDoctorant()->getEmailPro() ?: $these->getDoctorant()->getEmail()): ?> <a href="mailto: <?php echo $email ?>"><?php echo $email ?></a> <?php else: ?> <?php echo $this->translate("(Inconnu)"); ?> <?php endif ?> <br/> <strong> <?php echo $this->translate("Mail de contact :"); ?> </strong> <?php echo $these->getDoctorant()->getPersopass() ?: "(Non renseigné)" ?> <?php if ($mailContact === null) { echo "(Non renseigné) "; } else { echo $mailContact; if ($etatMailContact === MailConfirmation::ENVOYER) { echo " (en attente) "; } } ?> <?php if ($canEditPersopass): ?> <a href="<?php echo $modifierPersopassUrl ?>" data-event="<?php echo $persopassModifiedEvent ?>" Loading @@ -84,16 +106,9 @@ $persopassModifiedEvent = 'persopass-modified-event'; <span class="glyphicon glyphicon-pencil"></span> <?php echo $this->translate("Modifier"); ?> </a> <?php endif ?> <br> <strong> <?php echo $this->translate("Mail :"); ?> </strong> <?php if ($email = $these->getDoctorant()->getEmailPro() ?: $these->getDoctorant()->getEmail()): ?> <a href="mailto: <?php echo $email ?>"><?php echo $email ?></a> <?php else: ?> <?php echo $this->translate("(Inconnu)"); ?> <?php endif ?> <br/> </dd> <?php Loading Loading
module/Application/src/Application/Controller/Factory/TheseControllerFactory.php +4 −0 Changes for module/Application/src/Application/Controller/Factory/TheseControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -5,6 +5,7 @@ namespace Application\Controller\Factory; use Application\Controller\TheseController; use Application\Service\Etablissement\EtablissementService; use Application\Service\Fichier\FichierService; use Application\Service\MailConfirmationService; use Application\Service\Notification\NotificationService; use Application\Service\Role\RoleService; use Application\Service\These\TheseService; Loading Loading @@ -38,6 +39,7 @@ class TheseControllerFactory * @var WorkflowService $workflowService * @var NotificationService $notificationService * @var EtablissementService $etablissementService * @var MailConfirmationService $mailConfirmationService * @var EntityManager $entityManager */ $variableService = $controllerManager->getServiceLocator()->get('VariableService'); Loading @@ -48,6 +50,7 @@ class TheseControllerFactory $fichierService = $controllerManager->getServiceLocator()->get('FichierService'); $workflowService = $controllerManager->getServiceLocator()->get('WorkflowService'); $etablissementService = $controllerManager->getServiceLocator()->get('EtablissementService'); $mailConfirmationService = $controllerManager->getServiceLocator()->get('MailConfirmationService'); $entityManager = $controllerManager->getServiceLocator()->get('doctrine.entitymanager.orm_default'); $controller = new TheseController(); Loading @@ -60,6 +63,7 @@ class TheseControllerFactory $controller->setFichierService($fichierService); $controller->setWorkflowService($workflowService); $controller->setEtablissementService($etablissementService); $controller->setMailConfirmationService($mailConfirmationService); $controller->setEntityManager($entityManager); return $controller; Loading
module/Application/src/Application/Controller/TheseController.php +35 −1 Changes for module/Application/src/Application/Controller/TheseController.php: 35 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ use Application\Entity\Db\Attestation; use Application\Entity\Db\Diffusion; use Application\Entity\Db\Etablissement; use Application\Entity\Db\Fichier; use Application\Entity\Db\MailConfirmation; use Application\Entity\Db\MetadonneeThese; use Application\Entity\Db\NatureFichier; use Application\Entity\Db\RdvBu; Loading @@ -26,6 +27,7 @@ use Application\Form\RdvBuTheseForm; use Application\Service\Etablissement\EtablissementServiceAwareTrait; use Application\Service\Fichier\Exception\ValidationImpossibleException; use Application\Service\Fichier\FichierServiceAwareTrait; use Application\Service\MailConfirmationService; use Application\Service\Notification\NotificationServiceAwareTrait; use Application\Service\Role\RoleServiceAwareTrait; use Application\Service\These\Convention\ConventionPdfExporter; Loading @@ -47,6 +49,8 @@ use Zend\Form\Element\Hidden; use Zend\Http\Response; use Zend\Stdlib\ParametersInterface; use Zend\View\Model\ViewModel; use Application\Entity\Db\Individu; use Application\Service\MailConfirmationServiceAwareTrait; class TheseController extends AbstractController { Loading @@ -62,6 +66,7 @@ class TheseController extends AbstractController use IdifyFilterAwareTrait; use EtablissementServiceAwareTrait; use EntityManagerAwareTrait; use MailConfirmationServiceAwareTrait; private $timeoutRetraitement; Loading Loading @@ -217,12 +222,39 @@ class TheseController extends AbstractController $these->getCorrectionAutorisee() && count($this->validationService->getValidationsAttenduesPourCorrectionThese($these)) > 0; /** * @var Individu $individu * @var MailConfirmation $enCours * @var MailConfirmation $confirmee */ $individu = $these->getDoctorant()->getIndividu(); $enCours = $this->mailConfirmationService->getDemandeEnCoursByIndividu($individu); $confirmee = $this->mailConfirmationService->getDemandeConfirmeeByIndividu($individu); $mailContact = null; $etatMailContact = null; switch(true) { case($enCours !== null) : $mailContact = $enCours->getEmail(); $etatMailContact = MailConfirmation::ENVOYER; break; case($confirmee !== null) : $mailContact = $confirmee->getEmail(); $etatMailContact = MailConfirmation::CONFIRMER; break; } //TODO JP remplacer dans modifierPersopassUrl(); $urlModification = $this->url()->fromRoute('doctorant/modifier-persopass',['back' => 1, 'doctorant' => $these->getDoctorant()->getId()], [], true); $view = new ViewModel([ 'these' => $these, 'etablissement' => $etablissement, 'estDoctorant' => (bool)$this->userContextService->getSelectedRoleDoctorant(), 'showCorrecAttendue' => $showCorrecAttendue, 'modifierPersopassUrl' => $this->urlDoctorant()->modifierPersopassUrl($these), // 'modifierPersopassUrl' => $this->urlDoctorant()->modifierPersopassUrl($these), 'modifierPersopassUrl' => $urlModification, 'pvSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_PV_SOUTENANCE), 'rapportSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_RAPPORT_SOUTENANCE), 'preRapportSoutenanceUrl' => $this->urlThese()->depotFichiers($these, NatureFichier::CODE_PRE_RAPPORT_SOUTENANCE), Loading @@ -233,6 +265,8 @@ class TheseController extends AbstractController 'nextStepUrl' => $this->urlWorkflow()->nextStepBox($these, null, [ WfEtape::PSEUDO_ETAPE_FINALE, ]), 'mailContact' => $mailContact, 'etatMailContact' => $etatMailContact, ]); $view->setTemplate('application/these/identite'); Loading
module/Application/src/Application/Service/MailConfirmationServiceAwareTrait.php 0 → 100644 +22 −0 Changes for module/Application/src/Application/Service/MailConfirmationServiceAwareTrait.php: 22 added lines, 0 removed lines. Original line number Diff line number Diff line <?php namespace Application\Service; trait MailConfirmationServiceAwareTrait { /** * @var MailConfirmationService */ private $mailConfirmationService; /** * @param MailConfirmationService $service * @return self */ public function setMailConfirmationService(MailConfirmationService $service) { $this->mailConfirmationService = $service; return $this; } } No newline at end of file
module/Application/view/application/these/identite.phtml +26 −11 Changes for module/Application/view/application/these/identite.phtml: 26 added lines, 11 removed lines. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ use Application\Filter\ActeursFormatter; use Application\Entity\Db\WfEtape; use Application\Provider\Privilege\DoctorantPrivileges; use Application\View\Renderer\PhpRenderer; use Application\Entity\Db\MailConfirmation; /** * @var $this PhpRenderer Loading @@ -23,6 +24,8 @@ use Application\View\Renderer\PhpRenderer; * @var string $convMiseEnLigneUrl * @var string $avenantConvMiseEnLigneUrl * @var string $nextStepUrl * @var string $mailContact * @var string $etatMailContact */ $canEditPersopass = $this->isAllowed($these, DoctorantPrivileges::DOCTORANT_MODIFICATION_PERSOPASS); Loading Loading @@ -74,9 +77,28 @@ $persopassModifiedEvent = 'persopass-modified-event'; <?php echo $these->getDoctorant()->getSourceCode() ?> <br> <strong> <?php echo $this->translate("PersoP@ss :"); ?> <?php echo $this->translate("Mail :"); ?> </strong> <?php if ($email = $these->getDoctorant()->getEmailPro() ?: $these->getDoctorant()->getEmail()): ?> <a href="mailto: <?php echo $email ?>"><?php echo $email ?></a> <?php else: ?> <?php echo $this->translate("(Inconnu)"); ?> <?php endif ?> <br/> <strong> <?php echo $this->translate("Mail de contact :"); ?> </strong> <?php echo $these->getDoctorant()->getPersopass() ?: "(Non renseigné)" ?> <?php if ($mailContact === null) { echo "(Non renseigné) "; } else { echo $mailContact; if ($etatMailContact === MailConfirmation::ENVOYER) { echo " (en attente) "; } } ?> <?php if ($canEditPersopass): ?> <a href="<?php echo $modifierPersopassUrl ?>" data-event="<?php echo $persopassModifiedEvent ?>" Loading @@ -84,16 +106,9 @@ $persopassModifiedEvent = 'persopass-modified-event'; <span class="glyphicon glyphicon-pencil"></span> <?php echo $this->translate("Modifier"); ?> </a> <?php endif ?> <br> <strong> <?php echo $this->translate("Mail :"); ?> </strong> <?php if ($email = $these->getDoctorant()->getEmailPro() ?: $these->getDoctorant()->getEmail()): ?> <a href="mailto: <?php echo $email ?>"><?php echo $email ?></a> <?php else: ?> <?php echo $this->translate("(Inconnu)"); ?> <?php endif ?> <br/> </dd> <?php Loading