diff --git a/module/Application/src/Application/Entity/Db/Agent.php b/module/Application/src/Application/Entity/Db/Agent.php index 21ba983660220cd71faca8ff6eee9bc2f8b71d61..47936ce68037756d65196283d50df21c39c4dd85 100644 --- a/module/Application/src/Application/Entity/Db/Agent.php +++ b/module/Application/src/Application/Entity/Db/Agent.php @@ -275,7 +275,7 @@ class Agent implements $prenom = $this->getPrenom(); $prenom = str_replace("É", "é", $prenom); $prenom = str_replace("È", "è", $prenom); - return ucwords(strtolower($prenom), "- ") . ' ' . (($this->getNomUsuel())??'<em>'.$this->getNomFamille().'</em>'); + return (($this->getNomUsuel())??'<em>'.$this->getNomFamille().'</em>') . ' ' . ucwords(strtolower($prenom), "- "); } diff --git a/module/Application/view/application/index/partial/entretien.phtml b/module/Application/view/application/index/partial/entretien.phtml index 7fb5df00603935f9d4911505ae22f5392f79773f..a31f137089052598ef886cb1d40108a82cb93f09 100644 --- a/module/Application/view/application/index/partial/entretien.phtml +++ b/module/Application/view/application/index/partial/entretien.phtml @@ -60,7 +60,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() ) <span class="badge"> <?php echo count($finalises); ?> </span> </h2> - <?php echo $this->entretienProfessionnelArray($finalises); ?> + <?php echo $this->entretienProfessionnelArray($finalises, ['id' => 'complet']); ?> <?php endif; ?> @@ -70,7 +70,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() ) <span class="badge"> <?php echo count($encours); ?> </span> </h2> - <?php echo $this->entretienProfessionnelArray($encours); ?> + <?php echo $this->entretienProfessionnelArray($encours, ['id' => 'encours']); ?> <?php endif; ?> <?php if (!empty($obligatoires)) : ?> @@ -78,7 +78,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() ) Agents sans entretien professionnel pour la campagne <span class="badge"> <?php echo count($sansObligatoires); ?> </span> </h2> - <?php echo $this->convocationArray($sansObligatoires, $campagne); ?> + <?php echo $this->convocationArray($sansObligatoires, $campagne, ['id' => 'sansentretien']); ?> <?php endif; ?> <?php if (!empty($facultatifs)) : ?> @@ -97,7 +97,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() ) </div> </div> </div> - <?php echo $this->convocationArray($sansFacultatifs, $campagne); ?> + <?php echo $this->convocationArray($sansFacultatifs, $campagne, ['id' => 'sansobligation']); ?> <?php endif; ?> diff --git a/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/convocation-array.phtml b/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/convocation-array.phtml index 69d8a0e8807903729409003d64ee57bf997c4abf..440e9c679bc36280695a27e93ce92411f7784ee1 100644 --- a/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/convocation-array.phtml +++ b/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/convocation-array.phtml @@ -19,7 +19,7 @@ $canAction = ($canAfficher OR $canConvoquer); ?> -<table class="table table-condensed table-hover"> +<table class="table table-condensed table-hover" id="<?php echo $options['id']; ?>"> <thead> <tr> <th> Dénomination </th> @@ -92,3 +92,11 @@ $canAction = ($canAfficher OR $canConvoquer); <?php endforeach; ?> </tbody> </table> + +<script> + $(document).ready(function() { + $("table#<?php echo $options['id']; ?>").DataTable( { + 'paging' : false, + }); + }); +</script> diff --git a/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/entretien-professionnel-array.phtml b/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/entretien-professionnel-array.phtml index 474efa1d0cab180b42a5eb20edce68716e66afe7..af8faa9b040d6b5d8db8341e612c2ee3a72044ae 100644 --- a/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/entretien-professionnel-array.phtml +++ b/module/EntretienProfessionnel/src/EntretienProfessionnel/View/Helper/partial/entretien-professionnel-array.phtml @@ -4,7 +4,7 @@ use EntretienProfessionnel\Entity\Db\EntretienProfessionnel; use EntretienProfessionnel\Provider\Privilege\EntretienproPrivileges; /** - * @see \Formation\View\Helper\EntretienProfessionnelArrayViewHelper + * @see \EntretienProfessionnel\View\Helper\EntretienProfessionnelArrayViewHelper * @var EntretienProfessionnel[] $entretiens * @var array $options */ @@ -74,7 +74,7 @@ if ($options['affichages'] AND $options['affichages']['width']) $width = $option ?> -<table class="table table-condensed table-hover" style="margin:1rem 0;"> +<table class="table table-condensed table-hover datatable" id="<?php echo $options['id']; ?>" style="margin:1rem 0;"> <thead> <tr> <?php if ($displayAnnee) : ?> @@ -253,6 +253,12 @@ if ($options['affichages'] AND $options['affichages']['width']) $width = $option </style> <script> + $(document).ready(function() { + $("table#<?php echo $options['id']; ?>").DataTable( { + 'paging' : false, + }); + }); + function setActions(id) { let url = '../../entretien-professionnel/action/' + id; // console.log(url); diff --git a/module/EntretienProfessionnel/view/entretien-professionnel/campagne/structure.phtml b/module/EntretienProfessionnel/view/entretien-professionnel/campagne/structure.phtml index 3ec0e6cd71169fbf97fa1ce757144b31d61732f5..e03e4710f16c34dc62ca29803f6d9752e5bb881b 100644 --- a/module/EntretienProfessionnel/view/entretien-professionnel/campagne/structure.phtml +++ b/module/EntretienProfessionnel/view/entretien-professionnel/campagne/structure.phtml @@ -62,7 +62,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() . <span class="badge"> <?php echo count($finalises); ?> </span> </h2> - <?php echo $this->entretienProfessionnelArray($finalises, ['affichages' => ['annee' => false]]); ?> + <?php echo $this->entretienProfessionnelArray($finalises, ['affichages' => ['annee' => false], 'id' => 'complet']); ?> <?php endif; ?> @@ -72,7 +72,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() . <span class="badge"> <?php echo count($encours); ?> </span> </h2> - <?php echo $this->entretienProfessionnelArray($encours, ['affichages' => ['annee' => false]]); ?> + <?php echo $this->entretienProfessionnelArray($encours, ['affichages' => ['annee' => false], 'id' => 'encours']); ?> <?php endif; ?> <?php if (!empty($obligatoires)) : ?> @@ -80,7 +80,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() . Agents sans entretien professionnel pour la campagne <span class="badge"> <?php echo count($sansObligatoires); ?> </span> </h2> - <?php echo $this->convocationArray($sansObligatoires, $campagne); ?> + <?php echo $this->convocationArray($sansObligatoires, $campagne, ['id' => 'sansentretien']); ?> <?php endif; ?> <?php if (!empty($facultatifs)) : ?> @@ -99,7 +99,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() . </div> </div> </div> - <?php echo $this->convocationArray($sansFacultatifs, $campagne); ?> + <?php echo $this->convocationArray($sansFacultatifs, $campagne, ['id' => 'sansobligation']); ?> <?php endif; ?> diff --git a/module/EntretienProfessionnel/view/entretien-professionnel/entretien-professionnel/index-agent.phtml b/module/EntretienProfessionnel/view/entretien-professionnel/entretien-professionnel/index-agent.phtml index 4208f74afc16be8adec6eabe5c63b8cbabc674db..e89c236e9d4d90a2370c2680f5c0e8d79b27dff6 100644 --- a/module/EntretienProfessionnel/view/entretien-professionnel/entretien-professionnel/index-agent.phtml +++ b/module/EntretienProfessionnel/view/entretien-professionnel/entretien-professionnel/index-agent.phtml @@ -21,7 +21,8 @@ $canAfficherEntretien = true; <?php echo $this->entretienProfessionnelArray($entretiens, [ 'affichages' => ['agent' => false, 'lieu' => false], - 'droits' => ['modifier' => false, 'historiser' => false, 'supprimer' => false, 'sursis' => false] + 'droits' => ['modifier' => false, 'historiser' => false, 'supprimer' => false, 'sursis' => false], + 'id' => 'mes-entretiens' ] ); ?> diff --git a/module/Structure/view/structure/structure/agents.phtml b/module/Structure/view/structure/structure/agents.phtml index 3e1e5309272aafce11f52287da80738640d9f152..8c07b1dc866622bc47316d9862b366f46fedca00 100644 --- a/module/Structure/view/structure/structure/agents.phtml +++ b/module/Structure/view/structure/structure/agents.phtml @@ -36,7 +36,7 @@ $canAjouterAgent = $this->isAllowed($structure, StructurePrivileges::STRUCTURE_A <span class="badge"><?php echo count($agents); ?></span> </h2> -<?php echo $this->partial('partial/agents', ['structure' => $structure, 'agents' => $agents, 'superieurs' => $superieurs, 'autorites' => $autorites]); ?> +<?php echo $this->partial('partial/agents', ['options' => ['id' => 'agent'], 'structure' => $structure, 'agents' => $agents, 'superieurs' => $superieurs, 'autorites' => $autorites]); ?> <h2> Agents manuellement ajoutés @@ -52,4 +52,4 @@ $canAjouterAgent = $this->isAllowed($structure, StructurePrivileges::STRUCTURE_A </a> <?php endif; ?> -<?php echo $this->partial('partial/agents', ['structure' => $structure, 'agents' => $agentsForces, 'options' => ['force' => true]]); ?> \ No newline at end of file +<?php echo $this->partial('partial/agents', [ 'structure' => $structure, 'agents' => $agentsForces, 'options' => ['force' => true, 'id' => 'force']]); ?> \ No newline at end of file diff --git a/module/Structure/view/structure/structure/fiches-de-poste.phtml b/module/Structure/view/structure/structure/fiches-de-poste.phtml index 2e9b1ff56a80f4caf56a37321e1929a34b32e54c..ca143874c511cc82aae91338906a638ac8a05134 100644 --- a/module/Structure/view/structure/structure/fiches-de-poste.phtml +++ b/module/Structure/view/structure/structure/fiches-de-poste.phtml @@ -35,7 +35,7 @@ $date = new DateTime(); <?php echo $this->partial('partial/entete', ['structure' => $structure, 'campagnes' => $campagnes, 'current' => 'fiches-de-poste', 'selecteur' => $selecteur]); ?> -<table class="table table-condensed"> +<table class="table table-condensed datatable"> <thead> <tr> <th> Agent & Affectation </th> @@ -260,3 +260,11 @@ $date = new DateTime(); color: lightgrey; } </style> + +<script> +$(document).ready(function () { + $("table.datatable").DataTable({ + 'paging': false, + }); +}); +</script> \ No newline at end of file diff --git a/module/Structure/view/structure/structure/missions-specifiques.phtml b/module/Structure/view/structure/structure/missions-specifiques.phtml index 950df1505518a5ad38bf5f8645efb587a3786011..f0b1956723a14809587206fab4fb217529f27f3a 100644 --- a/module/Structure/view/structure/structure/missions-specifiques.phtml +++ b/module/Structure/view/structure/structure/missions-specifiques.phtml @@ -117,3 +117,12 @@ $canDetruireAffectation = $this->isAllowed(MissionspecifiquePrivileges::getR <?php endforeach; ?> </tbody> </table> + + +<script> + $(document).ready(function () { + $("table.datatable").DataTable({ + 'paging': false, + }); + }); +</script> \ No newline at end of file diff --git a/module/Structure/view/structure/structure/partial/agents.phtml b/module/Structure/view/structure/structure/partial/agents.phtml index ec6a95f987caeb7edcf238797ae302619cf41ff7..1d6cbe93103f923b4a44c39308bb5692f8a99bbb 100644 --- a/module/Structure/view/structure/structure/partial/agents.phtml +++ b/module/Structure/view/structure/structure/partial/agents.phtml @@ -32,7 +32,7 @@ $isForce = (isset($options['force']) AND $options['force'] === true); Afficher non administratif </span> -<table class="datatable table table-condensed" style="font-size: 14px;"> +<table class="datatable table table-condensed" id="<?php echo $options['id']; ?>" style="font-size: 14px;"> <thead> <tr> <th> Dénomination</th> @@ -142,4 +142,10 @@ $isForce = (isset($options['force']) AND $options['force'] === true); $("span#administatif_masquer").show(); $("span#administatif_afficher").hide(); }); + + $(document).ready(function() { + $("table#<?php echo $options['id']; ?>").DataTable( { + 'paging' : false, + }); + }); </script> \ No newline at end of file