Commit 262e4a53 authored by Thomas Hamel's avatar Thomas Hamel
Browse files

amélioration ui pour l'affichage du lieu d'une session pour un doctorant

parent bc45f52a
Loading
Loading
Loading
Loading
+1 −6
Changes for module/Formation/src/Formation/Assertion/Session/SessionAssertion.php: 1 added line, 6 removed lines.
Original line number Diff line number Diff line
@@ -76,13 +76,8 @@ class SessionAssertion extends AbstractAssertion implements AssertionInterface,

        switch ($role->getCode()) {
            case Role::CODE_DOCTORANT :
                $inscrits = $session->getInscriptions()->toArray();
                $userDoctorant = $this->doctorantService->getRepository()->findOneByIndividu($individu);
                foreach($inscrits as $inscrit){
                    /** @var Inscription $inscrit */
                    if($inscrit->getDoctorant() === $userDoctorant) return true;
                }
                return false;
                return $session->estInscrit($userDoctorant);
        }
        return true;
    }
+10 −10
Changes for module/Formation/view/formation/formation/afficher.phtml: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -36,16 +36,6 @@ echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace();
    <?php echo $pageTitle; ?>
</h1>

<?php if ($canModifierFormation) : ?>
    <?php /** @see \Formation\Controller\FormationController::modifierAction() */?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/formation/modifier', ['formation' => $formation->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>

<?php if ($canIndexFormation) : ?>
    <?php /** @see \Formation\Controller\FormationController::indexAction() */?>
    <a class="btn btn-primary action"
@@ -56,6 +46,16 @@ echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace();
    </a>
<?php endif; ?>

<?php if ($canModifierFormation) : ?>
    <?php /** @see \Formation\Controller\FormationController::modifierAction() */?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/formation/modifier', ['formation' => $formation->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>

<h2> Informations sur la formation </h2>

<dl class="row">
+10 −10
Changes for module/Formation/view/formation/module/afficher.phtml: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -29,16 +29,6 @@ $urlRetour = $this->url('formation/module/afficher', ['module' => $module->getId
    <?php echo $pageTitle; ?>
</h1>

<?php if ($canModifierModule) : ?>
    <?php /** @see \Formation\Controller\FormationController::modifierAction() */ ?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/module/modifier', ['module' => $module->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>

<?php if ($canIndexModule) : ?>
    <?php /** @see \Formation\Controller\FormationController::indexAction() */ ?>
    <a class="btn btn-primary action"
@@ -49,6 +39,16 @@ $urlRetour = $this->url('formation/module/afficher', ['module' => $module->getId
    </a>
<?php endif; ?>

<?php if ($canModifierModule) : ?>
    <?php /** @see \Formation\Controller\FormationController::modifierAction() */ ?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/module/modifier', ['module' => $module->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>

<h2> Informations sur le module </h2>

<dl class="row">
+17 −7
Changes for module/Formation/view/formation/session/afficher-fiche.phtml: 17 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -171,9 +171,9 @@ $this->headTitle($pageTitle);
    <table class="table table-sm table-hover">
    <thead>
    <tr>
        <?php if($canVoirLieuSession) : ?>
<!--        --><?php //if($canVoirLieuSession) : ?>
            <th> Lieu </th>
        <?php endif; ?>
<!--        --><?php //endif; ?>
        <th> Jour </th>
        <th> Début </th>
        <th> Fin </th>
@@ -184,18 +184,22 @@ $this->headTitle($pageTitle);
    <?php /** @var Seance $seance */ ?>
    <?php foreach ($seances as $seance) : ?>
        <tr>
            <td class="<?php echo $canVoirLieuSession ? "" : "lieu-session-non-visible"; ?>">
                <?php if ($canVoirLieuSession) : ?>
                <td>
                    <span class=" <?php if ($seance->estHistorise()) echo " historise text-danger "; ?>">
                            <?php echo $seance->getLieu(); ?>
                <?php else: ?>
                    <span class=" <?php if ($seance->estHistorise()) echo " historise text-danger "; ?>"
                              data-bs-toggle="tooltip"
                              title="Le lieu sera visible lorsque vous se serez inscrit à cette session">
                <?php endif; ?>
                <?php echo $canVoirLieuSession ? $seance->getLieu() : "<i>Non visible</i>"; ?>
                <?php if ($seance->getDescription() !== null) : ?>
                    <span class="icon icon-information"
                                      title="<?php echo $seance->getDescription(); ?>" data-bs-toggle="tooltip" data-bs-html="true"
                                ></span>
                          title="<?php echo $seance->getDescription(); ?>" data-bs-toggle="tooltip" data-bs-html="true">
                    </span>
                <?php endif; ?>
                </span>
            </td>
            <?php endif; ?>
            <td> <?php echo $seance->getDebut()->format('d/m/Y'); ?> </td>
            <td> <?php echo $seance->getDebut()->format('H:i'); ?> </td>
            <td> <?php echo $seance->getFin()->format('H:i'); ?> </td>
@@ -206,3 +210,9 @@ $this->headTitle($pageTitle);
</table>
<?php endif ?>
</div>

<script>
    $('.modal').on('shown.bs.modal', function () {
        $('[data-bs-toggle="tooltip"]').tooltip();
    });
</script>
 No newline at end of file
+9 −9
Changes for module/Formation/view/formation/session/afficher.phtml: 9 added lines, 9 removed lines.
Original line number Diff line number Diff line
@@ -81,15 +81,6 @@ usort($listeComplementaire, function (Inscription $a, Inscription $b) {return $a
echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace();
?>

<?php if ($canModifierSession) : ?>
    <?php /** @see \Formation\Controller\SessionController::modifierAction() */?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/session/modifier', ['session' => $session->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>
<?php if ($canIndexSession) : ?>
    <?php /** @see \Formation\Controller\SessionController::indexAction() */?>
    <a class="btn btn-primary action"
@@ -99,6 +90,15 @@ echo $this->messenger()->addMessagesFromFlashMessengerWithNoNamespace();
        Retourner à la liste des sessions
    </a>
<?php endif;?>
<?php if ($canModifierSession) : ?>
    <?php /** @see \Formation\Controller\SessionController::modifierAction() */?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
       href="<?php echo $this->url('formation/session/modifier', ['session' => $session->getId()], [], true); ?>"
    >
        <span class="icon icon-modifier"></span>
        Modifier les informations
    </a>
<?php endif; ?>
<?php if ($canModifierSession) : ?>
    <?php /** @see \Formation\Controller\SessionController::changerEtatAction() */?>
    <a class="btn btn-primary action ajax-modal" data-event="modification"
Loading