Loading module/Application/config/module.config.php +2 −0 Changes for module/Application/config/module.config.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ return array( '061_uploader' => "/vendor/jquery.iframe-transport.js", '062_uploader' => "/vendor/jquery.fileupload.js", '063_uploader' => "/vendor/unicaen.uploader.widget.js", '090_datatables' => "/vendor/datatables/datatables.min.js", ], 'inline_scripts' => [ '070_bootstrap-select' => '/vendor/bootstrap-select-1.14.0-beta3/js/bootstrap-select.min.js', Loading @@ -344,6 +345,7 @@ return array( '500_select2' => "/vendor/select2-4.0.13/dist/css/select2.min.css", '900_faa' => '/css/rapport-activite.css', '910_priv' => '/css/privilege.css', '910_datatables' => '/vendor/datatables/datatables.min.css', ], 'printable_stylesheets' => [ ], Loading module/Formation/src/Formation/Controller/IndexController.php +11 −7 Changes for module/Formation/src/Formation/Controller/IndexController.php: 11 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -10,11 +10,11 @@ use Doctorant\Service\DoctorantServiceAwareTrait; use Formation\Entity\Db\Etat; use Formation\Entity\Db\FormationExterne; use Formation\Entity\Db\Inscription; use Formation\Entity\Db\Session; use Formation\Provider\Parametre\FormationParametres; use Formation\Service\Justificatif\JustificatifServiceAwareTrait; use Formation\Provider\Validation\TypeValidation; use Formation\Service\Formation\FormationExterne\FormationExterneServiceAwareTrait; use Formation\Service\Justificatif\JustificatifServiceAwareTrait; use Formation\Service\Session\SessionServiceAwareTrait; use Formation\Service\Validation\ValidationFormationExterne\ValidationFormationExterneServiceAwareTrait; use Individu\Entity\Db\Individu; use Laminas\View\Model\ViewModel; Loading @@ -31,6 +31,7 @@ class IndexController extends AbstractController use FormationExterneServiceAwareTrait; use ValidationFormationExterneServiceAwareTrait; use JustificatifServiceAwareTrait; use SessionServiceAwareTrait; public function indexAction() : ViewModel { Loading @@ -52,8 +53,8 @@ class IndexController extends AbstractController $formationsExternes = []; if($doctorant) { // formations ouvertes et en préparation SANS CRITÈRES DE DATES pour afficher aussi celles de l'année univ suivantes $ouvertes = $this->getEntityManager()->getRepository(Session::class)->findSessionsByDoctorant($doctorant, Etat::CODE_OUVERTE, verifDatePublication: true); $preparations = $this->getEntityManager()->getRepository(Session::class)->findSessionsByDoctorant($doctorant, Etat::CODE_PREPARATION, verifDatePublication: true); $ouvertes = $this->sessionService->getRepository()->findSessionsByDoctorant($doctorant, Etat::CODE_OUVERTE, verifDatePublication: true); $preparations = $this->sessionService->getRepository()->findSessionsByDoctorant($doctorant, Etat::CODE_PREPARATION, verifDatePublication: true); /** @var Inscription[] $inscription */ $inscriptions = $this->getEntityManager()->getRepository(Inscription::class)->findInscriptionsByDoctorant($doctorant); Loading Loading @@ -115,13 +116,15 @@ class IndexController extends AbstractController } if($individu) { $passees = $this->getEntityManager()->getRepository(Session::class)->findSessionsPasseesByFormateur($individu); $courantes = $this->getEntityManager()->getRepository(Session::class)->findSessionsCourantesByFormateur($individu); $futures = $this->getEntityManager()->getRepository(Session::class)->findSessionsFuturesByFormateur($individu); $passees = $this->sessionService->getRepository()->findSessionsPasseesByFormateur($individu); $courantes = $this->sessionService->getRepository()->findSessionsCourantesByFormateur($individu); $futures = $this->sessionService->getRepository()->findSessionsFuturesByFormateur($individu); $annulees = $this->sessionService->getRepository()->findSessionsAnnuleesByFormateur($individu); } else { $passees = []; $courantes = []; $futures = []; $annulees = []; } return new ViewModel([ Loading @@ -129,6 +132,7 @@ class IndexController extends AbstractController 'passees' => $passees, 'courantes' => $courantes, 'futures' => $futures, 'annulees' => $annulees, ]); } Loading module/Formation/src/Formation/Controller/IndexControllerFactory.php +4 −0 Changes for module/Formation/src/Formation/Controller/IndexControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Doctorant\Service\DoctorantService; use Doctrine\ORM\EntityManager; use Formation\Service\Justificatif\JustificatifService; use Formation\Service\Formation\FormationExterne\FormationExterneService; use Formation\Service\Session\SessionService; use Formation\Service\Validation\ValidationFormationExterne\ValidationFormationExterneService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; Loading @@ -31,6 +32,7 @@ class IndexControllerFactory { * @var FormationExterneService $formationExterneService * @var ValidationFormationExterneService $validationFormationExterneService * @var JustificatifService $justificatifService * @var SessionService $sessionService */ $entityManager = $container->get('doctrine.entitymanager.orm_default'); $doctorantService = $container->get(DoctorantService::class); Loading @@ -39,6 +41,7 @@ class IndexControllerFactory { $formationExterneService = $container->get(FormationExterneService::class); $validationFormationExterneService = $container->get(ValidationFormationExterneService::class); $justificatifService = $container->get(JustificatifService::class); $sessionService = $container->get(SessionService::class); $controller = new IndexController(); $controller->setEntityManager($entityManager); Loading @@ -48,6 +51,7 @@ class IndexControllerFactory { $controller->setJustificatifService($justificatifService); $controller->setFormationExterneService($formationExterneService); $controller->setValidationFormationExterneService($validationFormationExterneService); $controller->setSessionService($sessionService); return $controller; } Loading module/Formation/src/Formation/Entity/Db/Repository/SessionRepository.php +23 −0 Changes for module/Formation/src/Formation/Entity/Db/Repository/SessionRepository.php: 23 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -203,6 +203,29 @@ class SessionRepository extends DefaultEntityRepository return $qb->getQuery()->getResult(); } /** * @param Individu $individu * @return array */ public function findSessionsAnnuleesByFormateur(Individu $individu) : array { $etats = [ Etat::CODE_ANNULEE]; $qb = $this->createQueryBuilder('session') ->leftJoin('session.formateurs', 'formateur') ->leftJoin('session.formateurs', 'aformateur')->addSelect('aformateur') ->andWhere('formateur.individu = :individu') ->setParameter('individu', $individu) ->andWhere('session.etat in (:etats)') ->andWhere('session.histoDestruction IS NULL') ->andWhere('formateur.histoDestruction IS NULL') ->setParameter('etats', $etats) ->orderBy('session.id', 'ASC') ; return $qb->getQuery()->getResult(); } /** * @param Formation|null $formation * @param string $champ Loading module/Formation/view/formation/index/index-formateur.phtml +145 −17 Changes for module/Formation/view/formation/index/index-formateur.phtml: 145 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ * @var Session[] $passees * @var Session[] $courantes * @var Session[] $futures * @var Session[] $annulees */ use Individu\Entity\Db\Individu; Loading @@ -30,7 +31,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <?php if ($canCatalogueAfficher) : ?> <?php /** @see \Formation\Controller\ModuleController::catalogueAction() */?> <a href="<?php echo $this->url('formation/catalogue',[],[], true); ?>" class="btn btn-primary" target="_blank"> <span class="icon icon-voir"> Accéder au catalogue des formations</span> <span class="icon icon-voir"></span> Accéder au catalogue des formations </a> <?php endif; ?> </div> Loading Loading @@ -78,6 +79,16 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP Mes formations à venir </a> </li> <li role="presentation" class="nav-item"> <a href="#annulees" class="nav-link" role="tab" aria-controls="annulees" data-bs-toggle="tab" > Mes formations annulées </a> </li> </ul> <div class="tab-content"> Loading @@ -86,7 +97,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP Formations en cours </h2> <table class="table table-sm"> <table class="table table-sm" id="formationsEnCoursTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -102,10 +113,10 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($courantes as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?> <br> Loading @@ -128,7 +139,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <div role="tabpanel" class="tab-pane" id="passees"> <h2> Mes formations passées </h2> <table class="table table-sm"> <table class="table table-sm" id="formationsPasseesTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -145,10 +156,10 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($passees as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?></td> <td> <?php echo $this->type($session); ?></td> <td> <?php echo $this->etat($session); ?></td> Loading @@ -168,7 +179,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <div role="tabpanel" class="tab-pane" id="futures"> <h2> Mes formations à venir</h2> <table class="table table-sm"> <table class="table table-sm" id="formationsFuturesTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -185,13 +196,13 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($futures as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?></td> <td> <?php echo $this->type($session); ?></td> <td> <?php echo $this->etat($session); ?></td> <td data-order="<?= $session->getEtat()->getCode()?>"> <?php echo $this->etat($session); ?></td> <td> <?php echo $this->sessionInscription($session, ['inscrits' => true]); ?> </td> <td> <?php if ($canSessionVoir) : ?> Loading @@ -206,13 +217,51 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP </table> <?php endif; ?> </div> </div> <div role="tabpanel" class="tab-pane in active" id="annulees"> <h2> Formations annulées </h2> <table class="table table-sm" id="formationsAnnuleesTable"> <thead> <tr> <th> Module de formation </th> <th> Formateur·trice·s </th> <th> Établissement </th> <th> Dates et lieux </th> <th> Modalité & type </th> <th> État </th> <th> Limite d’inscription </th> <th> Action </th> </tr> </thead> <tbody> <?php foreach ($annulees as $session) : ?> <tr> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?> <br> <?php echo $this->type($session); ?> </td> <td> <?php echo $this->etat($session); ?></td> <td> <?php echo $this->sessionInscription($session, ['inscrits' => true]); ?> </td> <td> <?php if ($canSessionVoir) : ?> <a href="<?php echo $this->url('formation/session/afficher', ['session' => $session->getId()], [], true); ?>" title="Accéder à la session" data-bs-toggle="tooltip" data-bs-html="true" ><span class="icon icon-voir"></span></a> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <script> $(function() { Loading @@ -232,4 +281,83 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP $(this).tab('show'); }); }); $(document).ready(function () { $('#formationsEnCoursTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation en cours n'a été trouvée" } }); $('#formationsPasseesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5] }, // colonnes triables { orderable: false, targets: [1, 6, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation passée n'a été trouvée" } }); $('#formationsFuturesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation passée n'a été trouvée" } }); $('#formationsAnnuleesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation annulée n'a été trouvée" } }); }); </script> No newline at end of file Loading
module/Application/config/module.config.php +2 −0 Changes for module/Application/config/module.config.php: 2 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ return array( '061_uploader' => "/vendor/jquery.iframe-transport.js", '062_uploader' => "/vendor/jquery.fileupload.js", '063_uploader' => "/vendor/unicaen.uploader.widget.js", '090_datatables' => "/vendor/datatables/datatables.min.js", ], 'inline_scripts' => [ '070_bootstrap-select' => '/vendor/bootstrap-select-1.14.0-beta3/js/bootstrap-select.min.js', Loading @@ -344,6 +345,7 @@ return array( '500_select2' => "/vendor/select2-4.0.13/dist/css/select2.min.css", '900_faa' => '/css/rapport-activite.css', '910_priv' => '/css/privilege.css', '910_datatables' => '/vendor/datatables/datatables.min.css', ], 'printable_stylesheets' => [ ], Loading
module/Formation/src/Formation/Controller/IndexController.php +11 −7 Changes for module/Formation/src/Formation/Controller/IndexController.php: 11 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -10,11 +10,11 @@ use Doctorant\Service\DoctorantServiceAwareTrait; use Formation\Entity\Db\Etat; use Formation\Entity\Db\FormationExterne; use Formation\Entity\Db\Inscription; use Formation\Entity\Db\Session; use Formation\Provider\Parametre\FormationParametres; use Formation\Service\Justificatif\JustificatifServiceAwareTrait; use Formation\Provider\Validation\TypeValidation; use Formation\Service\Formation\FormationExterne\FormationExterneServiceAwareTrait; use Formation\Service\Justificatif\JustificatifServiceAwareTrait; use Formation\Service\Session\SessionServiceAwareTrait; use Formation\Service\Validation\ValidationFormationExterne\ValidationFormationExterneServiceAwareTrait; use Individu\Entity\Db\Individu; use Laminas\View\Model\ViewModel; Loading @@ -31,6 +31,7 @@ class IndexController extends AbstractController use FormationExterneServiceAwareTrait; use ValidationFormationExterneServiceAwareTrait; use JustificatifServiceAwareTrait; use SessionServiceAwareTrait; public function indexAction() : ViewModel { Loading @@ -52,8 +53,8 @@ class IndexController extends AbstractController $formationsExternes = []; if($doctorant) { // formations ouvertes et en préparation SANS CRITÈRES DE DATES pour afficher aussi celles de l'année univ suivantes $ouvertes = $this->getEntityManager()->getRepository(Session::class)->findSessionsByDoctorant($doctorant, Etat::CODE_OUVERTE, verifDatePublication: true); $preparations = $this->getEntityManager()->getRepository(Session::class)->findSessionsByDoctorant($doctorant, Etat::CODE_PREPARATION, verifDatePublication: true); $ouvertes = $this->sessionService->getRepository()->findSessionsByDoctorant($doctorant, Etat::CODE_OUVERTE, verifDatePublication: true); $preparations = $this->sessionService->getRepository()->findSessionsByDoctorant($doctorant, Etat::CODE_PREPARATION, verifDatePublication: true); /** @var Inscription[] $inscription */ $inscriptions = $this->getEntityManager()->getRepository(Inscription::class)->findInscriptionsByDoctorant($doctorant); Loading Loading @@ -115,13 +116,15 @@ class IndexController extends AbstractController } if($individu) { $passees = $this->getEntityManager()->getRepository(Session::class)->findSessionsPasseesByFormateur($individu); $courantes = $this->getEntityManager()->getRepository(Session::class)->findSessionsCourantesByFormateur($individu); $futures = $this->getEntityManager()->getRepository(Session::class)->findSessionsFuturesByFormateur($individu); $passees = $this->sessionService->getRepository()->findSessionsPasseesByFormateur($individu); $courantes = $this->sessionService->getRepository()->findSessionsCourantesByFormateur($individu); $futures = $this->sessionService->getRepository()->findSessionsFuturesByFormateur($individu); $annulees = $this->sessionService->getRepository()->findSessionsAnnuleesByFormateur($individu); } else { $passees = []; $courantes = []; $futures = []; $annulees = []; } return new ViewModel([ Loading @@ -129,6 +132,7 @@ class IndexController extends AbstractController 'passees' => $passees, 'courantes' => $courantes, 'futures' => $futures, 'annulees' => $annulees, ]); } Loading
module/Formation/src/Formation/Controller/IndexControllerFactory.php +4 −0 Changes for module/Formation/src/Formation/Controller/IndexControllerFactory.php: 4 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ use Doctorant\Service\DoctorantService; use Doctrine\ORM\EntityManager; use Formation\Service\Justificatif\JustificatifService; use Formation\Service\Formation\FormationExterne\FormationExterneService; use Formation\Service\Session\SessionService; use Formation\Service\Validation\ValidationFormationExterne\ValidationFormationExterneService; use Interop\Container\ContainerInterface; use Psr\Container\ContainerExceptionInterface; Loading @@ -31,6 +32,7 @@ class IndexControllerFactory { * @var FormationExterneService $formationExterneService * @var ValidationFormationExterneService $validationFormationExterneService * @var JustificatifService $justificatifService * @var SessionService $sessionService */ $entityManager = $container->get('doctrine.entitymanager.orm_default'); $doctorantService = $container->get(DoctorantService::class); Loading @@ -39,6 +41,7 @@ class IndexControllerFactory { $formationExterneService = $container->get(FormationExterneService::class); $validationFormationExterneService = $container->get(ValidationFormationExterneService::class); $justificatifService = $container->get(JustificatifService::class); $sessionService = $container->get(SessionService::class); $controller = new IndexController(); $controller->setEntityManager($entityManager); Loading @@ -48,6 +51,7 @@ class IndexControllerFactory { $controller->setJustificatifService($justificatifService); $controller->setFormationExterneService($formationExterneService); $controller->setValidationFormationExterneService($validationFormationExterneService); $controller->setSessionService($sessionService); return $controller; } Loading
module/Formation/src/Formation/Entity/Db/Repository/SessionRepository.php +23 −0 Changes for module/Formation/src/Formation/Entity/Db/Repository/SessionRepository.php: 23 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -203,6 +203,29 @@ class SessionRepository extends DefaultEntityRepository return $qb->getQuery()->getResult(); } /** * @param Individu $individu * @return array */ public function findSessionsAnnuleesByFormateur(Individu $individu) : array { $etats = [ Etat::CODE_ANNULEE]; $qb = $this->createQueryBuilder('session') ->leftJoin('session.formateurs', 'formateur') ->leftJoin('session.formateurs', 'aformateur')->addSelect('aformateur') ->andWhere('formateur.individu = :individu') ->setParameter('individu', $individu) ->andWhere('session.etat in (:etats)') ->andWhere('session.histoDestruction IS NULL') ->andWhere('formateur.histoDestruction IS NULL') ->setParameter('etats', $etats) ->orderBy('session.id', 'ASC') ; return $qb->getQuery()->getResult(); } /** * @param Formation|null $formation * @param string $champ Loading
module/Formation/view/formation/index/index-formateur.phtml +145 −17 Changes for module/Formation/view/formation/index/index-formateur.phtml: 145 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -6,6 +6,7 @@ * @var Session[] $passees * @var Session[] $courantes * @var Session[] $futures * @var Session[] $annulees */ use Individu\Entity\Db\Individu; Loading @@ -30,7 +31,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <?php if ($canCatalogueAfficher) : ?> <?php /** @see \Formation\Controller\ModuleController::catalogueAction() */?> <a href="<?php echo $this->url('formation/catalogue',[],[], true); ?>" class="btn btn-primary" target="_blank"> <span class="icon icon-voir"> Accéder au catalogue des formations</span> <span class="icon icon-voir"></span> Accéder au catalogue des formations </a> <?php endif; ?> </div> Loading Loading @@ -78,6 +79,16 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP Mes formations à venir </a> </li> <li role="presentation" class="nav-item"> <a href="#annulees" class="nav-link" role="tab" aria-controls="annulees" data-bs-toggle="tab" > Mes formations annulées </a> </li> </ul> <div class="tab-content"> Loading @@ -86,7 +97,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP Formations en cours </h2> <table class="table table-sm"> <table class="table table-sm" id="formationsEnCoursTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -102,10 +113,10 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($courantes as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?> <br> Loading @@ -128,7 +139,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <div role="tabpanel" class="tab-pane" id="passees"> <h2> Mes formations passées </h2> <table class="table table-sm"> <table class="table table-sm" id="formationsPasseesTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -145,10 +156,10 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($passees as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?></td> <td> <?php echo $this->type($session); ?></td> <td> <?php echo $this->etat($session); ?></td> Loading @@ -168,7 +179,7 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <div role="tabpanel" class="tab-pane" id="futures"> <h2> Mes formations à venir</h2> <table class="table table-sm"> <table class="table table-sm" id="formationsFuturesTable"> <thead> <tr> <th> Module de formation </th> Loading @@ -185,13 +196,13 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP <tbody> <?php foreach ($futures as $session) : ?> <tr> <td> <?php echo $this->sessionLibelle($session); ?> </td> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td> <?php echo $this->seances($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?></td> <td> <?php echo $this->type($session); ?></td> <td> <?php echo $this->etat($session); ?></td> <td data-order="<?= $session->getEtat()->getCode()?>"> <?php echo $this->etat($session); ?></td> <td> <?php echo $this->sessionInscription($session, ['inscrits' => true]); ?> </td> <td> <?php if ($canSessionVoir) : ?> Loading @@ -206,13 +217,51 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP </table> <?php endif; ?> </div> </div> <div role="tabpanel" class="tab-pane in active" id="annulees"> <h2> Formations annulées </h2> <table class="table table-sm" id="formationsAnnuleesTable"> <thead> <tr> <th> Module de formation </th> <th> Formateur·trice·s </th> <th> Établissement </th> <th> Dates et lieux </th> <th> Modalité & type </th> <th> État </th> <th> Limite d’inscription </th> <th> Action </th> </tr> </thead> <tbody> <?php foreach ($annulees as $session) : ?> <tr> <td data-order="<?= $session->getFormation()->getLibelle()?>"> <?php echo $this->sessionLibelle($session); ?> </td> <td> <?php echo $this->formateurs($session); ?> </td> <td> <?php echo $this->site($session); ?> </td> <td data-order="<?= $session->getDateDebut()->getTimestamp()?>"> <?php echo $this->seances($session); ?> </td> <td> <?php echo $this->modalite($session); ?> <br> <?php echo $this->type($session); ?> </td> <td> <?php echo $this->etat($session); ?></td> <td> <?php echo $this->sessionInscription($session, ['inscrits' => true]); ?> </td> <td> <?php if ($canSessionVoir) : ?> <a href="<?php echo $this->url('formation/session/afficher', ['session' => $session->getId()], [], true); ?>" title="Accéder à la session" data-bs-toggle="tooltip" data-bs-html="true" ><span class="icon icon-voir"></span></a> <?php endif; ?> </td> </tr> <?php endforeach; ?> </tbody> </table> </div> </div> <script> $(function() { Loading @@ -232,4 +281,83 @@ $canCatalogueAfficher = $this->isAllowed(ModulePrivileges::getResourceId(ModuleP $(this).tab('show'); }); }); $(document).ready(function () { $('#formationsEnCoursTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation en cours n'a été trouvée" } }); $('#formationsPasseesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5] }, // colonnes triables { orderable: false, targets: [1, 6, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation passée n'a été trouvée" } }); $('#formationsFuturesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation passée n'a été trouvée" } }); $('#formationsAnnuleesTable').DataTable({ paging: false, searching: true, info: true, ordering: true, columnDefs: [ { orderable: true, targets: [0, 2, 3, 4, 5, 6] }, // colonnes triables { orderable: false, targets: [1, 7] } // non triables ], order: [[3, 'asc']], language: { url: '/vendor/datatables/fr_language.json', emptyTable: "Aucune formation annulée n'a été trouvée" } }); }); </script> No newline at end of file