Loading module/Application/src/Application/View/Helper/partial/agent.phtml +9 −7 Changes for module/Application/src/Application/View/Helper/partial/agent.phtml: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Application\Entity\Db\Agent; use Application\Entity\Db\AgentMissionSpecifique; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\MissionspecifiqueaffectationPrivileges; use Application\Provider\Privilege\MissionspecifiquePrivileges; $canVoirMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); Loading @@ -16,7 +17,7 @@ $canLettre = $this->isAllowed(MissionspecifiquePrivileges::getResou $canAjouterMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER)); $canModifierMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER)); $canHistoriserMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER)); $canDetruireMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER)); $canDetruireMission = $this->isAllowed(MissionspecifiqueaffectationPrivileges::getResourceId(MissionspecifiqueaffectationPrivileges::MISSIONSPECIFIQUEAFFECTATION_DETRUIRE)); $now = new DateTime(); Loading Loading @@ -107,11 +108,11 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"]; foreach ($agent->getMissionsSpecifiques() as $mission) : $structure = $mission->getStructure(); ?> <tr <?php if (!$mission->estEnCours()) : ?> class="historise" <?php endif; ?> > <?php if ($canDetruireMission OR $mission->estNonHistorise()) : ?> <tr class=" <?php if (!$mission->estEnCours()) echo " termine "; ?> <?php if ($mission->estHistorise()) echo " historise "; ?> "> <td> <?php echo $mission->getMission()->getLibelle(); ?> </td> <td> <?php echo ($structure)?$structure->getLibelleLong():"Aucune structure"; ?> </td> <td> <?php echo ($mission->getDateDebut())?$mission->getDateDebut()->format('d/m/Y'):"---"; ?> </td> Loading Loading @@ -177,7 +178,8 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"]; <?php endif; ?> </td> <?php endif;?> </tr> </> <?php endif; ?> <?php endforeach; ?> </tbody> </table> Loading Loading
module/Application/src/Application/View/Helper/partial/agent.phtml +9 −7 Changes for module/Application/src/Application/View/Helper/partial/agent.phtml: 9 added lines, 7 removed lines. Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use Application\Entity\Db\Agent; use Application\Entity\Db\AgentMissionSpecifique; use Application\Provider\Privilege\AgentPrivileges; use Application\Provider\Privilege\MissionspecifiqueaffectationPrivileges; use Application\Provider\Privilege\MissionspecifiquePrivileges; $canVoirMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER)); Loading @@ -16,7 +17,7 @@ $canLettre = $this->isAllowed(MissionspecifiquePrivileges::getResou $canAjouterMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER)); $canModifierMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EDITER)); $canHistoriserMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER)); $canDetruireMission = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_EFFACER)); $canDetruireMission = $this->isAllowed(MissionspecifiqueaffectationPrivileges::getResourceId(MissionspecifiqueaffectationPrivileges::MISSIONSPECIFIQUEAFFECTATION_DETRUIRE)); $now = new DateTime(); Loading Loading @@ -107,11 +108,11 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"]; foreach ($agent->getMissionsSpecifiques() as $mission) : $structure = $mission->getStructure(); ?> <tr <?php if (!$mission->estEnCours()) : ?> class="historise" <?php endif; ?> > <?php if ($canDetruireMission OR $mission->estNonHistorise()) : ?> <tr class=" <?php if (!$mission->estEnCours()) echo " termine "; ?> <?php if ($mission->estHistorise()) echo " historise "; ?> "> <td> <?php echo $mission->getMission()->getLibelle(); ?> </td> <td> <?php echo ($structure)?$structure->getLibelleLong():"Aucune structure"; ?> </td> <td> <?php echo ($mission->getDateDebut())?$mission->getDateDebut()->format('d/m/Y'):"---"; ?> </td> Loading Loading @@ -177,7 +178,8 @@ if (isset($options["retour"])) $query["retour"] = $options["retour"]; <?php endif; ?> </td> <?php endif;?> </tr> </> <?php endif; ?> <?php endforeach; ?> </tbody> </table> Loading