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

Retrait de l'action d'affichage pour les formations devenu inutile dans nouveau système

parent e1e6f433
Loading
Loading
Loading
Loading
+0 −12
Changes for module/Application/config/merged/formation.config.php: 0 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -64,8 +64,6 @@ return [
                [
                    'controller' => FormationController::class,
                    'action' => [
                        'afficher',

                        'afficher-groupe',
                        'afficher-theme',
                    ],
@@ -642,16 +640,6 @@ return [
                            ],
                        ],
                    ],
                    'afficher' => [
                        'type'  => Segment::class,
                        'options' => [
                            'route'    => '/afficher/:formation',
                            'defaults' => [
                                'controller' => FormationController::class,
                                'action'     => 'afficher',
                            ],
                        ],
                    ],
                    'editer' => [
                        'type'  => Segment::class,
                        'options' => [
+1 −10
Changes for module/Application/src/Application/Controller/FormationController.php: 1 added line, 10 removed lines.
Original line number Diff line number Diff line
@@ -41,16 +41,7 @@ class FormationController extends AbstractActionController
        ]);
    }

    /** FOMRATION *****************************************************************************************************/

    public function afficherAction()
    {
        $formation = $this->getFormationService()->getRequestedFormation($this);
        return new ViewModel([
            'title' => 'Affichage de la formation [' . $formation->getLibelle() . ']',
            'formation' => $formation,
        ]);
    }
    /** FORMATION *****************************************************************************************************/

    public function ajouterAction()
    {
+0 −62
Changes for module/Application/view/application/formation/afficher.phtml: 0 added lines, 62 removed lines.
Original line number Diff line number Diff line
<?php

use Application\Entity\Db\Formation;

/**
 * @var Formation $formation
 */

?>

<div class="panel panel-info">
    <div class="panel-heading">
        <h2><?php echo $formation->getLibelle() ?></h2>
    </div>
    <div class="panel-body">
        <h3> Description </h3>
        <?php if ($formation->getDescription() !== null) : ?>
            <?php echo $formation->getDescription(); ?>
        <?php else : ?>
            Aucune description.
        <?php endif; ?>

        <h3> Lien </h3>
        <?php if ($formation->getLien() !== null && $formation->getLien() !== "") : ?>
            <a href="<?php echo $formation->getLien(); ?>">
                <?php echo $formation->getLien(); ?>
            </a>
        <?php else : ?>
            Aucun lien.
        <?php endif; ?>

        <h3> Connaissances/Compétences liées
            <span class="badge">
                <?php echo count($formation->getMissions()); ?>
            </span>
        </h3>
        <?php if (!empty($formation->getMissions())): ?>
            <ul>
                <?php foreach ($formation->getMissions() as $mission) : ?>
                    <li> <?php echo $mission->getLibelle(); ?> </li>
                <?php endforeach; ?>
            </ul>
        <?php else : ?>
            Aucune connaissance ou compétence liée à cette formation
        <?php endif; ?>

        <h3> Applications liées
            <span class="badge">
                <?php echo count($formation->getApplications()); ?>
            </span>
        </h3>
        <?php if (!empty($formation->getApplications())): ?>
            <ul>
                <?php foreach ($formation->getApplications() as $application) : ?>
                    <li> <?php echo $application->getLibelle(); ?> </li>
                <?php endforeach; ?>
            </ul>
        <?php else : ?>
            Aucune application liée à cette formation
        <?php endif; ?>
    </div>
</div>
+1 −9
Changes for module/Application/view/application/formation/partial/index-formation.phtml: 1 added line, 9 removed lines.
Original line number Diff line number Diff line
@@ -10,7 +10,6 @@ use Application\Entity\Db\Formation;
$canAfficher = $droits['afficher'];
$canAjouter = $droits['ajouter'];
$canAjouterInstance = $droits['ajouter'];
$canEditer = $droits['editer'];
$canHistoriser = $droits['historiser'];
$canDetruire = $droits['detruire'];

@@ -63,18 +62,11 @@ usort($formations, function(Formation $a, Formation $b) {
            <td> <?php echo ($formation->getTheme())?$formation->getTheme()->getLibelle():""; ?> </td>
            <td>
                <?php if ($canAfficher) : ?>
                    <a
                        <?php /** @see FormationController::afficherAction() */ ?>
                        href="<?php echo $this->url('formation/afficher', ['formation' => $formation->getId()], [], true); ?>"
                    >
                        <span class="icon voir" title="Afficher la formation"></span></a>
                <?php endif; ?>
                <?php if ($canEditer) : ?>
                    <a
                        <?php /** @see FormationController::editerAction() */ ?>
                        href="<?php echo $this->url('formation/editer', ['formation' => $formation->getId()], [], true); ?>"
                    >
                        <span class="icon editer" title="Modifier la formation"></span></a>
                        <span class="icon voir" title="Afficher la formation"></span></a>
                <?php endif; ?>
                <?php if ($canHistoriser) : ?>
                    <?php if ($formation->estNonHistorise()) : ?>