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

Completion des actions dans les index

parent 1f88d7da
Loading
Loading
Loading
Loading
−1
Changes for module/Formation/src/Formation/Controller/InscriptionController.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use Application\Entity\Db\Individu;
use Application\Service\Doctorant\DoctorantServiceAwareTrait;
use Application\Service\Individu\IndividuServiceAwareTrait;
use Formation\Entity\Db\Inscription;
use Formation\Entity\Db\Module;
use Formation\Entity\Db\Session;
use Formation\Service\Inscription\InscriptionServiceAwareTrait;
use UnicaenApp\Service\EntityManagerAwareTrait;
+40 −11
Changes for module/Formation/view/formation/inscription/index.phtml: 40 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -7,19 +7,14 @@

use Formation\Entity\Db\Inscription;

?>

<h1> Index des inscriptions </h1>

$canVoirSession = true;

<a
    <?php /** @see \Formation\Controller\Inscription::ajouterAction() */ ?>
    href="<?php echo $this->url('formation/inscription/ajouter', ['session' => 2, 'individu' => 5001], [], true); ?>"
    class="btn btn-primary action">
    <span class="glyphicon glyphicon-plus"></span>
    Ajouter une formation
</a>
$canHistoriser = true;
$canSupprimer = true;
?>

<h1> Index des inscriptions </h1>

<table class="table table-condensed">
    <thead>
@@ -52,7 +47,41 @@ use Formation\Entity\Db\Inscription;
                    </span>
                <?php endif; ?>
            </td>
            <td></td>
            <td>
                <?php if ($canVoirSession AND $inscription->getSession() !== null) : ?>
                    <?php /** @see \Formation\Controller\SessionController::afficherAction() */ ?>
                    <a href="<?php echo $this->url('formation/session/afficher', ['session' => $inscription->getSession()->getId()], [], true); ?>"
                       title="Accéder à la session associée" data-toggle="tooltip" data-html="true"
                    >
                        <span class="glyphicon glyphicon-list-alt"></span>
                    </a>
                <?php endif; ?>
                <?php if ($canHistoriser) : ?>
                    <?php if ($inscription->estNonHistorise()) : ?>
                        <?php /** @see \Formation\Controller\InscriptionController::historiserAction() */ ?>
                        <a href="<?php echo $this->url('formation/inscription/historiser', ['inscription' => $inscription->getId()], [], true); ?>"
                           title="Historiser l'inscription" data-toggle="tooltip" data-html="true"
                        >
                            <span class="glyphicon glyphicon-trash"></span>
                        </a>
                    <?php else : ?>
                        <?php /** @see \Formation\Controller\InscriptionController::restaurerAction() */ ?>
                        <a href="<?php echo $this->url('formation/inscription/restaurer', ['inscription' => $inscription->getId()], [], true); ?>"
                           title="Restaurer l'inscription" data-toggle="tooltip" data-html="true"
                        >
                            <span class="glyphicon glyphicon-leaf"></span>
                        </a>
                    <?php endif; ?>
                <?php endif; ?>
                <?php if ($canSupprimer) : ?>
                    <?php /** @see \Formation\Controller\InscriptionController::supprimerAction() */?>
                    <a href="<?php echo $this->url('formation/inscription/supprimer',['inscription' => $inscription->getId()], [], true); ?>"
                       class="ajax-modal" data-event="modification"
                       title="Suppression de l'inscription de <?php echo $inscription->getDoctorant()->getIndividu()->getNomComplet(); ?>" data-toggle="tooltip" data-html="true">
                        <span class="glyphicon glyphicon-remove"></span>
                    </a>
                <?php endif; ?>
            </td>
        </tr>
    <?php endforeach; ?>
    </tbody>
+40 −13
Changes for module/Formation/view/formation/seance/index.phtml: 40 added lines, 13 removed lines.
Original line number Diff line number Diff line
@@ -7,21 +7,14 @@

use Formation\Entity\Db\Seance;

$canHistoriser = true;
$canSupprimer = true;
$canVoirSession = true;

?>

<h1> Index des seances </h1>


<a
    <?php /** @see \Formation\Controller\SeanceController::ajouterAction() */ ?>
    href="<?php echo $this->url('formation/seance/ajouter', ['session' => 2], [], true); ?>"
    class="btn btn-primary action ajax-modal" data-event="modification"
>
    <span class="glyphicon glyphicon-plus"></span>
    Ajouter une seance
</a>


<table class="table table-condensed">
    <thead>
    <tr>
@@ -45,10 +38,44 @@ use Formation\Entity\Db\Seance;
                &rightarrow;
                <?php echo $seance->getFin()->format('d/m/Y à H:i'); ?>
                <br/>
                DUREE (TODO)
                <?php echo $seance->getDuree(); ?> h.
            </td>
            <td> <?php echo $seance->getLieu(); ?> </td>
            <td></td>
            <td>
                <?php if ($canVoirSession AND $seance->getSession() !== null) : ?>
                    <?php /** @see \Formation\Controller\SessionController::afficherAction() */ ?>
                    <a href="<?php echo $this->url('formation/session/afficher', ['session' => $seance->getSession()->getId()], [], true); ?>"
                       title="Accéder à la session associée" data-toggle="tooltip" data-html="true"
                    >
                    <span class="glyphicon glyphicon-list-alt"></span>
                    </a>
                <?php endif; ?>
                <?php if ($canHistoriser) : ?>
                    <?php if ($seance->estNonHistorise()) : ?>
                        <?php /** @see \Formation\Controller\SeanceController::historiserAction() */ ?>
                        <a href="<?php echo $this->url('formation/seance/historiser', ['seance' => $seance->getId()], [], true); ?>"
                           title="Historiser la seance" data-toggle="tooltip" data-html="true"
                        >
                            <span class="glyphicon glyphicon-trash"></span>
                        </a>
                    <?php else : ?>
                        <?php /** @see \Formation\Controller\SeanceController::restaurerAction() */ ?>
                        <a href="<?php echo $this->url('formation/seance/restaurer', ['seance' => $seance->getId()], [], true); ?>"
                           title="Restaurer la seance" data-toggle="tooltip" data-html="true"
                        >
                            <span class="glyphicon glyphicon-leaf"></span>
                        </a>
                    <?php endif; ?>
                <?php endif; ?>
                <?php if ($canSupprimer) : ?>
                    <?php /** @see \Formation\Controller\SeanceController::supprimerAction() */?>
                    <a href="<?php echo $this->url('formation/seance/supprimer',['seance' => $seance->getId()], [], true); ?>"
                       class="ajax-modal" data-event="modification"
                       title="Suppression de la seance #<?php echo $seance->getId(); ?>" data-toggle="tooltip" data-html="true">
                        <span class="glyphicon glyphicon-remove"></span>
                    </a>
                <?php endif; ?>
            </td>
        </tr>
    <?php endforeach; ?>
    </tbody>