diff --git a/documentation/release/3.1.0.md b/documentation/release/3.1.0.md index 550940919bd108669168f6e30e9626a261b47d77..9bc89ae59e9116f2dc77837e92e787b897201d9a 100644 --- a/documentation/release/3.1.0.md +++ b/documentation/release/3.1.0.md @@ -6,11 +6,12 @@ **Changements** * Ajout des types de correspondance -* +* Ajout d'un viewhelper pour l'affichage des correspondances +* Remplacement pour affichage du type en plus de la correspondance **Modifications de la base de donnée** -Afin de modéliser les différents types de correspondances il est nécessaire de proposer dans la source de données des données ressamblant à la vue suivante (V_CORRESPONDANCE_TYPE). +Afin de modéliser les différents types de correspondances, il est nécessaire de proposer dans la source de données des données ressamblant à la vue suivante (V_CORRESPONDANCE_TYPE). Ces données seront importées et référencées dans les correspondances. | column | type | contrainte | diff --git a/module/Application/src/Application/Entity/Db/MacroContent/AgentMacroTrait.php b/module/Application/src/Application/Entity/Db/MacroContent/AgentMacroTrait.php index d6161ab53823c5798bb687897daa1b730cb5dcfa..ff6de595484fb94f8680f5d7cc9132d1a97308ed 100644 --- a/module/Application/src/Application/Entity/Db/MacroContent/AgentMacroTrait.php +++ b/module/Application/src/Application/Entity/Db/MacroContent/AgentMacroTrait.php @@ -124,7 +124,12 @@ trait AgentMacroTrait foreach ($grades as $grade) { // $texte .= "<li>"; $grade_libelle = $grade->getCorps()->getLibelleLong(); - $grade_bap = ($grade->getBap() !== null)?$grade->getBap()->getCategorie():""; + $correspondance = $grade->getBap(); + if ($correspondance) { + $grade_bap = $correspondance->getType()->getLibelleCourt(). " " .$correspondance->getLibelleCourt(); + } else { + $grade_bap = ""; + } $texte .= $grade_libelle . " ". $grade_bap; $texte .= " ("; if($grade->estFini()) { diff --git a/module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php b/module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php index 899846558b5125772188395e6e87d685f2a4fc84..c7dfb6480a0c9d27f249d4b160ffdbeeb5e01172 100644 --- a/module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php +++ b/module/Application/src/Application/Entity/Db/MacroContent/FichePosteMacroTrait.php @@ -392,7 +392,7 @@ trait FichePosteMacroTrait { if ($metier === null) return $texte; if ($metier->getCategorie()) $texte .= "Catégorie : " . $metier->getCategorie()->getCode() . "<br/>"; if (true /**$metier->getNiveau()**/) $texte .= "Corps : " . "Lien manquant" . "<br/>"; - if (true /**$metier->getBap()**/) $texte .= "BAP : " . "Lien manquant" . "<br/>"; + if (true /**$metier->getBap()**/) $texte .= "Correspondance : " . "Lien manquant" . "<br/>"; return $texte; } diff --git a/module/Application/src/Application/View/Helper/partial/agent-grade.phtml b/module/Application/src/Application/View/Helper/partial/agent-grade.phtml index bb6002a5a802854a9735476c2ba026e3db851837..976d187dd15ed6d72b38def8778d7e151b1bf170 100644 --- a/module/Application/src/Application/View/Helper/partial/agent-grade.phtml +++ b/module/Application/src/Application/View/Helper/partial/agent-grade.phtml @@ -63,7 +63,7 @@ $displayCorrespondance = (isset($options['correspondance']) and $options['corres <?php endif; ?> <?php if ($displayCorrespondance) : ?> - <?php echo $grade->getBap()->getCategorie(); ?> + <?php echo $this->correspondance($grade->getBap()); ?> <?php endif; ?> <?php if ($displayTemoin) : ?> @@ -95,9 +95,7 @@ $displayCorrespondance = (isset($options['correspondance']) and $options['corres <dt class="col-md-3"> Correspondance</dt> <dd class="col-md-9"> <?php if ($grade->getBap()) : ?> - BAP - <?php echo $grade->getBap()->getCategorie(); ?> - - <?php echo $grade->getBap()->getLibelleLong(); ?> + <?php echo $this->correspondance($grade->getBap()); ?> <?php else : ?> Non renseignée <?php endif; ?> diff --git a/module/Application/view/application/agent/partial/tutorat.phtml b/module/Application/view/application/agent/partial/tutorat.phtml index 1316124c4762d06f5247fd2ed1bea8322ad7be20..0648ad048536bf5bfe4aecc93180dfd9185141d4 100644 --- a/module/Application/view/application/agent/partial/tutorat.phtml +++ b/module/Application/view/application/agent/partial/tutorat.phtml @@ -135,7 +135,7 @@ $canDetruirePPP = $canAjouterPPP; <thead> <tr> <th> Agent </th> - <th> BAP </th> + <th> Correspondance </th> <th> Corps </th> <th> Période </th> <th> Compléments </th> @@ -148,7 +148,13 @@ $canDetruirePPP = $canAjouterPPP; <?php foreach ($accompagnements as $accompagnement) : ?> <tr <?php if ($accompagnement->estHistorise()) echo " class='historise' "; ?>> <td> <?php echo $accompagnement->getCible()->getDenomination(); ?> </td> - <td> <?php echo ($accompagnement->getBap())?$accompagnement->getBap()->getLibelleCourt():"Aucun"; ?> </td> + <td> + <?php if ($accompagnement->getBap()) : ?> + <?php echo $this->correspondance($accompagnement->getBap()); ?> + <?php else : ?> + Aucun + <?php endif; ?> + </td>> <td> <?php echo ($accompagnement->getCorps())?$accompagnement->getCorps()->getLibelleCourt():"Aucun"; ?> </td> <td> <?php echo $accompagnement->getDateDebutToString(); ?> diff --git a/module/Carriere/src/Carriere/View/Helper/partial/correspondance.phtml b/module/Carriere/src/Carriere/View/Helper/partial/correspondance.phtml index c24b2ad394eb4221720b1725ffd10e49f519d39c..82c6c96e25832c75da02d0d7f4305689a29c9fe7 100644 --- a/module/Carriere/src/Carriere/View/Helper/partial/correspondance.phtml +++ b/module/Carriere/src/Carriere/View/Helper/partial/correspondance.phtml @@ -26,7 +26,7 @@ use Carriere\Entity\Db\Correspondance; <?php endif; ?> - <span title="<?php echo $correspondance->getLibelleLong(); ?>"> - <?php echo $correspondance->getCategorie(); ?> + <?php echo $correspondance->getLibelleCourt(); ?> </span> <?php endif; ?>