Commit 0f5c61c5 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Amélioration du rendu et des certaines requetes (2/X)

parent 2b4f3705
Loading
Loading
Loading
Loading
+15 −4
Changes for module/Application/view/application/agent/afficher.phtml: 15 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -19,7 +19,17 @@ $canHistoriser = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_HISTOR
$canDetruire    = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_DETRUIRE);
$canValider     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_VALIDER);

$droits = [
    'voir'            =>      $canVoir,
    'ajouter'         =>      $canAjouter,
    'modifier'        =>      $canModifier,
    'historiser'      =>      $canHistoriser,
    'detruire'        =>      $canDetruire,
    'valider'         =>      $canValider,
];

$this->headTitle("Affichage de l'agent : " . $agent->getDenomination());

?>

<h1 class="page-header">
@@ -68,8 +78,9 @@ $this->headTitle("Affichage de l'agent : " . $agent->getDenomination());
        <div class="col-md-4">
            <!-- Information générale "application" -->
            <dl>
                <dt> Identifiant source </dt>
                <dt> Identifiant sources </dt>
                <dd>
                    OCTOPUS - <?php echo $agent->getId(); ?> <br/>
                    <?php if($agent->getSourceId()) : ?>
                        <?php echo $agent->getSourceName(); ?>
                    -
@@ -121,10 +132,10 @@ $this->headTitle("Affichage de l'agent : " . $agent->getDenomination());
    <?php echo $this->partial('partial/fiche-poste', ['fichespostes' => $agent->getFiches()], []); ?>

    <?php echo $this->partial('partial/entretien-professionnel',
        ['entretiens' => $agent->getEntretiensProfessionnels(), 'agent' => $agent, 'user' => $user, 'role' => $role]
        ['entretiens' => $agent->getEntretiensProfessionnels(), 'agent' => $agent, "droits" => $droits]
    , []); ?>

    <?php echo $this->partial('partial/mission-specifique', ['missions' => $agent->getMissionsSpecifiques(), 'agent' => $agent], []); ?>
    <?php echo $this->partial('partial/mission-specifique', ['missions' => $agent->getMissionsSpecifiques(), 'agent' => $agent,  "droits" => $droits], []); ?>

    <h2> Applications, compétences et formations</h2>

@@ -455,7 +466,7 @@ $this->headTitle("Affichage de l'agent : " . $agent->getDenomination());
        </div>
    </div>

    <?php echo $this->partial('partial/porte-folio', ['fichiers' => $agent->getFichiers(), 'agent' => $agent], []); ?>
    <?php echo $this->partial('partial/portfolio', ['fichiers' => $agent->getFichiers(), 'agent' => $agent, 'droits' => $droits], []); ?>

</div>

+6 −12
Changes for module/Application/view/application/agent/partial/entretien-professionnel.phtml: 6 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -2,25 +2,19 @@

/**
 * @var EntretienProfessionnel[] $entretiens
 * @var boolean $isAgent
 * @var Agent $agent
 * @var User $user
 * @var Role $role
 * @var array $droits
 */

use Application\Constant\RoleConstant;
use Application\Entity\Db\Agent;
use Application\Entity\Db\EntretienProfessionnel;
use Application\Provider\Privilege\AgentPrivileges;
use UnicaenUtilisateur\Entity\Db\Role;
use UnicaenUtilisateur\Entity\Db\User;


$canVoirEntretienPro         = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_VOIR);
$canAjouterEntretienPro      = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_AJOUTER_EPRO);
$canModifierEntretienPro     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_MODIFIER);
$canHistoriserEntretienPro   = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_HISTORISER);
$canDetruireEntretienPro     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_DETRUIRE);
$canVoirEntretienPro         = $droits['voir'];
$canAjouterEntretienPro      = $droits['ajouter'];
$canModifierEntretienPro     = $droits['modifier'];
$canHistoriserEntretienPro   = $droits['historiser'];
$canDetruireEntretienPro     = $droits['detruire'];
?>

<h2>
+6 −6
Changes for module/Application/view/application/agent/partial/mission-specifique.phtml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -2,18 +2,18 @@

use Application\Entity\Db\Agent;
use Application\Entity\Db\AgentMissionSpecifique;
use Application\Provider\Privilege\AgentPrivileges;

/**
 * @var AgentMissionSpecifique[] $missions
 * @var Agent $agent
 * @var array $droits
 */

$canVoirMission         = $this->isAllowed(AgentPrivileges::getResourceId(AgentPrivileges::AGENT_AFFICHER));
$canAjouterMission      = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_AJOUTER);
$canModifierMission     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_MODIFIER);
$canHistoriserMission   = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_HISTORISER);
$canDetruireMission     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_DETRUIRE);
$canVoirMission         = $droits['voir'];
$canAjouterMission      = $droits['ajouter'];
$canModifierMission     = $droits['modifier'];
$canHistoriserMission   = $droits['historiser'];
$canDetruireMission     = $droits['detruire'];

?>

+5 −4
Changes for module/Application/view/application/agent/partial/portfolio.phtml: 5 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -7,12 +7,13 @@ use Fichier\Entity\Db\Fichier;
/**
 * @var Fichier[] $fichiers
 * @var Agent $agent
 * @var array $droits
 */

$canVoirFichier         = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_VOIR);
$canAjouterFichier      = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_AJOUTER);
$canHistoriserFichier   = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_HISTORISER);
$canDetruireFichier     = $this->isAllowed($agent, AgentPrivileges::AGENT_ELEMENT_DETRUIRE);
$canVoirFichier         = $droits['voir'];
$canAjouterFichier      = $droits['ajouter'];
$canHistoriserFichier   = $droits['historiser'];
$canDetruireFichier     = $droits['detruire'];

?>