Commit 2d768f38 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Page de description

parent b37ca4a9
Loading
Loading
Loading
Loading
+1 −1
Changes for module/EntretienProfessionnel/view/entretien-professionnel/campagne/structure.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ $this->headTitle("Campagne d'entretien professionnel " . $campagne->getAnnee() .
        <div class="row">
            <div class="col-md-1"><span class="icon icon-info"></span></div>
            <div class="col-md-10">
                Les agents n'étant pas en poste à la date du <?php echo $dateMinEnPoste->format('d/m/Y'); ?> non pas d'obligation d'entretien professionnel.
                Les agents n'étant pas en poste à la date du <?php echo $dateMinEnPoste->format('d/m/Y'); ?> n'ont pas d'obligation d'entretien professionnel.
                <br/>
                Vous pouvez cependant planifier un entretien professionnel si vous le souhaitez.
            </div>
+14 −0
Changes for module/Structure/config/merged/structure.config.php: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ return [
                    'controller' => StructureController::class,
                    'action' => [
                        'afficher',
                        'description',
                    ],
                    'privileges' => StructurePrivileges::STRUCTURE_AFFICHER,
                    'assertion'  => StructureAssertion::class,
@@ -167,6 +168,19 @@ return [
                        'may_terminate' => true,
                        'child_routes' => [],
                    ],
                    'description' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/description/:structure',
                            'defaults' => [
                                /** @see StructureController::descriptionAction() */
                                'controller' => StructureController::class,
                                'action'     => 'description',
                            ],
                        ],
                        'may_terminate' => true,
                        'child_routes' => [],
                    ],
                    'organigramme' => [
                        'type'  => Segment::class,
                        'options' => [
+19 −0
Changes for module/Structure/src/Structure/Controller/StructureController.php: 19 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -158,6 +158,25 @@ class StructureController extends AbstractActionController {
        ]);
    }

    public function descriptionAction() : ViewModel
    {
        $structure = $this->getStructureService()->getRequestedStructure($this);
        $responsables = $this->getStructureService()->getResponsables($structure, new DateTime());

        $niveau2 = $structure->getNiv2();
        $parent = $structure->getParent();
        $filles = $structure->getEnfants();

        return new ViewModel([
            'structure' => $structure,
            'responsables' => $responsables,

            'niveau2' => $niveau2,
            'parent' => $parent,
            'filles' => $filles,
        ]);
    }

    /** RESUME ********************************************************************************************************/

    public function editerDescriptionAction() : ViewModel
+100 −0
Changes for module/Structure/view/structure/structure/description.phtml: 100 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

use Application\Entity\Db\Agent;
use Structure\Entity\Db\Structure;

/**
 * @see \Structure\Controller\StructureController::descriptionAction()
 * @var Structure $structure
 *
 * @var Agent[] $responsables
 *
 * @var Structure $niveau2
 * @var Structure $parent
 * @var Structure[] $filles
 */

$this->headTitle($structure->getLibelleLong() . " - Description");

?>

<?php echo $this->partial('partial/entete', ['structure' => $structure]); ?>

<div class="row">
    <div class="col-md-6">
        <h2> Description </h2>

        <h3> Rattachement </h3>

        Structure rattachée à <?php echo $niveau2->getLibelleLong(); ?>

        <h3> Présentation de la structure</h3>

        <?php if ($structure->getRepriseResumeMere()) : ?>
            <div class="alert alert-info">
                <span class="icon icon-information"></span>
                Reprise du résumé de la structure mère.
            </div>
        <?php endif; ?>
        <?php if ($structure->getDescriptionComplete()) : ?>
            <?php echo $structure->getDescriptionComplete(); ?>
        <?php else : ?>
            <span class="text-warning">
                <span class="icon icon-attention"></span>
                Aucune description
            </span>
        <?php endif; ?>

        <h3> Autres informations </h3>

        <dl class="row">
            <?php if ($structure->getOuverture() !== null) : ?>
                <dt class="col-md-4"> Date d'ouverture </dt>
                <dd class="col-md-8"> <?php echo $structure->getOuverture()->format('d/m/Y'); ?></dd>
            <?php endif; ?>
            <?php if ($structure->getFermeture() !== null) : ?>
                <dt class="col-md-4"> Date de fermeture </dt>
                <dd class="col-md-8"> <?php echo $structure->getFermeture()->format('d/m/Y'); ?></dd>
            <?php endif; ?>
            <?php if ($structure->getAdresseFonctionnelle() !== null) : ?>
                <dt class="col-md-4"> Adresse de contact </dt>
                <dd class="col-md-8"> <?php echo $structure->getAdresseFonctionnelle(); ?></dd>
            <?php endif; ?>
        </dl>
    </div>
    <div class="col-md-6">
        <h2> Responsable·s </h2>

        <?php if (empty($responsables)) : ?>
            <span class="text-warning">
                <span class="icon icon-attention"></span>
                Aucun responsable de désigné·e pour cette structure.
            </span>
        <?php else : ?>
            <ul>
                <?php foreach ($responsables as $responsable) : ?>
                    <li>
                    <span title="Responsabilité valide sur la période du <?php echo ($responsable->getDateDebut())?$responsable->getDateDebut()->format('d/m/Y'):"N.C"; ?> au  <?php echo ($responsable->getDateFin())?$responsable->getDateFin()->format('d/m/Y'):"N.C"; ?>">
                        <?php echo $responsable->getAgent()->getDenomination(); ?>
                    </span>
                    </li>
                <?php endforeach; ?>
            </ul>
        <?php endif; ?>

        <h2> Positionnement de la structure </h2>

        <h3>Structure mère <code>n+1</code></h3>
        <?php echo $parent->getLibelleLong(); ?>

        <h3>Structure courante <code>n</code></h3>
        <?php echo $structure->getLibelleLong(); ?>

        <h3>Structure·s enfant·s <code>n-1</code></h3>
        <?php foreach ($filles as $enfant) : ?>
            <?php echo $enfant->getLibelleLong()?>
            <br/>
        <?php endforeach; ?>

    </div>
</div>
+26 −0
Changes for module/Structure/view/structure/structure/partial/entete.phtml: 26 added lines, 0 removed lines.
Original line number Diff line number Diff line
<?php

use Structure\Entity\Db\Structure;

/**
 * @var Structure $structure
 * @var string $current <i> onglet actif pour mise en forme
 */

?>

<h1 class="page-header">
    <strong><?php echo $structure->getLibelleLong(); ?></strong>
    <br>
    <?php echo $structure->getType()->getLibelle(); ?>
</h1>

Description
Agent·es
Fiches de poste
Missions complémentaires
Campagne XXX
Campagne XXX
Extraction

ONGLET
 No newline at end of file