diff --git a/database/migration/1.0.4.sql b/database/migration/1.0.4.sql index 6d43c8641a19446a61a65fc0f55af7ddd418b830..b62842bc483a67f47f651594d532fdba09c6b49d 100644 --- a/database/migration/1.0.4.sql +++ b/database/migration/1.0.4.sql @@ -1,5 +1,3 @@ -INSERT INTO unicaen_privilege_categorie (code, libelle, namespace, ordre) -VALUES ('agent', 'Gestion des agents', 'Agent\Provider\Privilege', 100); INSERT INTO unicaen_privilege_privilege(CATEGORIE_ID, CODE, LIBELLE, ORDRE) WITH d(code, lib, ordre) AS ( SELECT 'agent_gerer_valideur_importe', 'Gérer les valideur·deuses importé·es', 60 UNION diff --git a/module/Application/view/application/index/index-gestionnaire.phtml b/module/Application/view/application/index/index-gestionnaire.phtml index dedf10de6288335b9a48006220b72a724519be13..19761668851356b05acc702ecb1a57a3a63795a6 100644 --- a/module/Application/view/application/index/index-gestionnaire.phtml +++ b/module/Application/view/application/index/index-gestionnaire.phtml @@ -4,10 +4,10 @@ * @see \Application\Controller\IndexController::indexGestionnaireAction() * @var User $user * @var Role $role - * @var EtatType[] $etatsTypesSession - * @var EtatType[] $etatsTypesDemande - * @var Session[][] $dictionnaireSession - * @var DemandeExterne[] $dictionnaireDemande + * @var EtatType[] $etatsTypesSession + * @var EtatType[] $etatsTypesDemande + * @var Session[][] $dictionnaireSession + * @var DemandeExterne[] $dictionnaireDemande */ use DemandeExterne\Entity\Db\DemandeExterne; @@ -38,20 +38,40 @@ foreach ($dictionnaireDemande as $etatCode => $demandes) { <span class="badge"><?php echo $sessionsEnGestion; ?></span> </h2> +<div class="card"> + <div class="card-header"> + Formations au plan de formation dont vous êtes gestionnaire + </div> + <div class="card-body"> + <div class="repartition"> + <?php foreach ($dictionnaireSession as $etatCode => $sessions) : ?> + <a href="#<?php echo $etatCode; ?>" class="raccourci"> + <span class="raccourci"> + <?php echo $this->etattype($etatsTypesSession[$etatCode], ['display-categorie' => false]); ?> + <?php //echo $etatsTypesSession[$etatCode]->getLibelle(); ?> + <?php echo count($sessions); ?> session·s + </span> + </a> + <?php endforeach; ?> + </div> + </div> +</div> + <?php foreach ($dictionnaireSession as $etatCode => $sessions) : ?> <?php if (!empty($sessions)) : ?> - <div class="card"> - <div class="card-header bg-default"> - <?php echo $this->etattype($etatsTypesSession[$etatCode], ['display-categorie' => false]); ?> - <?php echo count($sessions); ?> session·s à l'états [<?php echo $etatsTypesSession[$etatCode]->getLibelle(); ?>] - </div> - <?php if (count($sessions) > 0) : ?> - <div class="card-body"> - <?php echo $this->formationInstanceArray($sessions, ['affichage' => ['gestionnaires' => false]]); ?> + <div class="card" id="<?php echo $etatCode; ?>"> + <div class="card-header bg-default togglable"> + <?php echo $this->etattype($etatsTypesSession[$etatCode], ['display-categorie' => false]); ?> + <?php echo count($sessions); ?> session·s à l'états + [<?php echo $etatsTypesSession[$etatCode]->getLibelle(); ?>] + </div> + <?php if (count($sessions) > 0) : ?> + <div class="card-body"> + <?php echo $this->formationInstanceArray($sessions, ['affichage' => ['gestionnaires' => false]]); ?> + </div> + <?php endif; ?> </div> - <?php endif; ?> - </div> <?php endif; ?> <?php endforeach; ?> @@ -63,17 +83,49 @@ foreach ($dictionnaireDemande as $etatCode => $demandes) { <?php foreach ($dictionnaireDemande as $etatCode => $demandes) : ?> <?php if (!empty($demandes)) : ?> - <div class="card"> - <div class="card-header bg-default"> - <?php echo $this->etattype($etatsTypesDemande[$etatCode], ['display-categorie' => false]); ?> - <?php echo count($demandes); ?> demande·s externe·s à l'états [<?php echo $etatsTypesDemande[$etatCode]->getLibelle(); ?>] - </div> - <?php if (count($demandes) > 0) : ?> - <div class="card-body"> - <?php echo $this->demandeExterneArray($demandes, ['affichage' => ['gestionnaires' => false]]); ?> + <div class="card"> + <div class="card-header bg-default"> + <?php echo $this->etattype($etatsTypesDemande[$etatCode], ['display-categorie' => false]); ?> + <?php echo count($demandes); ?> demande·s externe·s à l'états + [<?php echo $etatsTypesDemande[$etatCode]->getLibelle(); ?>] </div> - <?php endif; ?> - </div> + <?php if (count($demandes) > 0) : ?> + <div class="card-body"> + <?php echo $this->demandeExterneArray($demandes, ['affichage' => ['gestionnaires' => false]]); ?> + </div> + <?php endif; ?> + </div> <?php endif; ?> <?php endforeach; ?> +<style> + + div.repartition { + display: flex; + justify-content: space-between; /* Écarte uniformément les spans */ + width: 100%; + } + + a.raccourci { + text-decoration: none; + color: black + } + + a.raccourci > span { + border: 1px solid black; + padding: 0.25rem 0.5rem; + display: inline-block; + border-radius: 0.25rem; + } + + span.raccourci:hover { + cursor: pointer; + background: var(--unistrap-color-light); + } +</style> + +<script> + $('.card-header.togglable').on("click", function () { + $(this).next().toggle(); + }); +</script> \ No newline at end of file diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index b6f48bf78bbac7323a70a36c38704406062288ec..9919086e9958060e579ce5d86ebb33fa86d8b042 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -48,34 +48,6 @@ echo $this->doctype(); ->menu('navigation') ->setUlClass('navbar-nav mx-auto') ->setPartial('layout/menu-principal.phtml'); ?> - -<!-- <div class="dropdown navbar-nav text-end me-4">--> -<!-- <a href="#" class="nav-link d-block text-decoration-none dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false" data-bs-auto-close="outside">--> -<!-- <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" class="bi bi-question-circle-fill" viewBox="0 0 16 16"><path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.496 6.033h.825c.138 0 .248-.113.266-.25.09-.656.54-1.134 1.342-1.134.686 0 1.314.343 1.314 1.168 0 .635-.374.927-.965 1.371-.673.489-1.206 1.06-1.168 1.987l.003.217a.25.25 0 0 0 .25.246h.811a.25.25 0 0 0 .25-.25v-.105c0-.718.273-.927 1.01-1.486.609-.463 1.244-.977 1.244-2.056 0-1.511-1.276-2.241-2.673-2.241-1.267 0-2.655.59-2.75 2.286a.237.237 0 0 0 .241.247zm2.325 6.443c.61 0 1.029-.394 1.029-.927 0-.552-.42-.94-1.029-.94-.584 0-1.009.388-1.009.94 0 .533.425.927 1.01.927z"/></svg>--> -<!-- Accessibilité--> -<!-- </a>--> -<!-- <ul class="dropdown-menu rounded-0 p-3" style="min-width: 250px;">--> -<!-- <li>--> -<!-- <div class="text-decoration-none fw-bold mb-2">Paramètres d’accessibilité</div>--> -<!-- <div class="form-check form-switch">--> -<!-- <input class="form-check-input bt-access access-contrast" type="checkbox" role="switch" id="accessibilite-contrast">--> -<!-- <label class="form-check-label bt-access" for="accessibilite-contrast">Plus de contraste</label>--> -<!-- </div>--> -<!-- <div class="form-check form-switch">--> -<!-- <input class="form-check-input bt-access access-dys-font" type="checkbox" role="switch" id="accessibilite-dys-font">--> -<!-- <label class="form-check-label bt-access" for="accessibilite-dys-font">Police (dyslexie)</label>--> -<!-- </div>--> -<!-- <div class="form-check form-switch">--> -<!-- <input class="form-check-input bt-access access-dys-line" type="checkbox" role="switch" id="accessibilite-dys-line">--> -<!-- <label class="form-check-label bt-access" for="accessibilite-dys-line">Interlignage</label>--> -<!-- </div>--> -<!-- <div class="form-check form-switch">--> -<!-- <input class="form-check-input bt-access access-justify" type="checkbox" role="switch" id="accessibilite-justify">--> -<!-- <label class="form-check-label bt-access" for="accessibilite-justify">Pas de justification</label>--> -<!-- </div>--> -<!-- </li>--> -<!-- </ul>--> -<!-- </div>--> <div class="navbar-text text-end"> <?php echo $this->appConnection(); ?> </div> @@ -85,14 +57,18 @@ echo $this->doctype(); <div>Spacer</div> </header> - <main class="main-unistrap container-fluid position-relative d-flex p-0"> - <div class="shape-divider shape-bottom shape-triangle shape-color-foot"> - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"> - <path d="M1200 0L0 0 892.25 114.72 1200 0z" class="shape-fill"></path> - </svg> - </div> + <main class="main-unistrap container-fluid position-relative d-flex p-0" id="AnchorUp"> +<!-- <div class="shape-divider shape-bottom shape-triangle shape-color-foot">--> +<!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">--> +<!-- <path d="M1200 0L0 0 892.25 114.72 1200 0z" class="shape-fill"></path>--> +<!-- </svg>--> +<!-- </div>--> <div id="contenu-principal" class="container bg-white px-4 pt-4 pb-6"> <?php echo $this->content; ?> + <span id="Up"> + <span class="fas fa-angle-up"></span> + haut de page + </span> </div> </main> @@ -146,14 +122,38 @@ echo $this->doctype(); background-attachment: fixed; background-position: right var(--position-x) top var(--position-y); } -</style> -<style> :root { --position-x: 5.3vw; --position-y: 7.3vh; } + + span#Up { + padding: 0.1rem 0.5rem; + border-radius: 1rem; + border: 1px solid grey; + position: fixed; + bottom : 120px; + right : 100px; + background: white; + z-index:1050 !important; + } + + span#Up:hover { + cursor: pointer; + } </style> +<script> + $('span#Up').on("click", function() { + const target = document.getElementById("contenu-principal"); + const targetPosition = target.getBoundingClientRect().top + window.pageYOffset - 40; + + window.scrollTo({ + top: targetPosition, + behavior: "smooth" + }); + }); +</script> </body> </html> diff --git a/module/Formation/src/Formation/View/Helper/partial/sessions-array.phtml b/module/Formation/src/Formation/View/Helper/partial/sessions-array.phtml index a800e969e6a8d64587681f10a6bc3109f5c83205..3984eb2d0ae0ea21d79b97cbe95063e378a15d56 100644 --- a/module/Formation/src/Formation/View/Helper/partial/sessions-array.phtml +++ b/module/Formation/src/Formation/View/Helper/partial/sessions-array.phtml @@ -44,7 +44,7 @@ usort($sessions, function (Session $a, Session $b) { $sessions = array_reverse($sessions); ?> -<table class="datatable table table-condensed"> +<table class="datatable table table-condensed" id=""> <thead> <tr> <th> Session</th> @@ -167,3 +167,7 @@ $sessions = array_reverse($sessions); <?php endforeach; ?> </tbody> </table> + +<script> + +</script>