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

remise en place du bouton pour générer les roles par défaut

parent bd3ba6bc
Loading
Loading
Loading
Loading
Loading
+3 −3
Changes for module/Application/src/Application/Controller/StructureController.php: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -77,17 +77,17 @@ class StructureController extends AbstractController
            case TypeStructure::CODE_ECOLE_DOCTORALE :
                $ecole = $this->getEcoleDoctoraleService()->getRepository()->findByStructureId($id);
                $this->getRoleService()->addRoleByStructure($ecole);
                $this->redirect()->toRoute('ecole-doctorale', [], ['query' => ['selected' => $id]]);
                $this->redirect()->toRoute('ecole-doctorale/information', ['ecoleDoctorale' => $id], [], true);
                break;
            case TypeStructure::CODE_UNITE_RECHERCHE :
                $unite = $this->getUniteRechercheService()->getRepository()->findByStructureId($id);
                $this->getRoleService()->addRoleByStructure($unite);
                $this->redirect()->toRoute('unite-recherche', [], ['query' => ['selected' => $id]]);
                $this->redirect()->toRoute('unite-recherche/information', ['uniteRecherche' => $id], [], true);
                break;
            case TypeStructure::CODE_ETABLISSEMENT :
                $unite = $this->getEtablissementService()->getRepository()->findByStructureId($id);
                $this->getRoleService()->addRoleByStructure($unite);
                $this->redirect()->toRoute('etablissement', [], ['query' => ['selected' => $id]]);
                $this->redirect()->toRoute('etablissement/information', ['etablissement' => $id], [], true);
                break;
        }
    }
+14
Changes for module/Application/view/application/ecole-doctorale/information.phtml: 14 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,10 +8,12 @@
 */

use Application\Entity\Db\EcoleDoctorale;
use Application\Entity\Db\TypeStructure;

$this->headTitle('Details de l\'école doctorale ['.$ecole->getLibelle().']');

$canEdit = true;
$canAddRole = true;
?>

<h1 class="page-header">
@@ -32,6 +34,18 @@ $canEdit = true;
    </a>
<?php endif; ?>

<?php if ($canAddRole && empty($roleListing)): ?>
    <a
            href="<?php echo $this->url('structure/generer-roles-defauts',
                ['id' => $ecole->getStructure()->getId(), 'type' => TypeStructure::CODE_ECOLE_DOCTORALE], [], true);?>"
            class="btn btn-warning"
    >
        <span class="glyphicon glyphicon-refresh"></span>
        Générer rôles par défaut
    </a>
<?php endif; ?>



<div>
    <h2>
+13
Changes for module/Application/view/application/etablissement/information.phtml: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -8,10 +8,13 @@
 */

use Application\Entity\Db\Etablissement;
use Application\Entity\Db\TypeStructure;

$this->headTitle('Details de l\'établissement ['.$etablissement->getLibelle().']');

$canEdit = true;
$canAddRole = true;

?>

<h1 class="page-header">
@@ -32,6 +35,16 @@ $canEdit = true;
    </a>
<?php endif; ?>

<?php if ($canAddRole && empty($roleListing)): ?>
    <a
            href="<?php echo $this->url('structure/generer-roles-defauts',
                ['id' => $etablissement->getStructure()->getId(), 'type' => TypeStructure::CODE_ETABLISSEMENT], [], true);?>"
            class="btn btn-warning"
    >
        <span class="glyphicon glyphicon-refresh"></span>
        Générer rôles par défaut
    </a>
<?php endif; ?>

<div>
    <h2>
+13
Changes for module/Application/view/application/unite-recherche/information.phtml: 13 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -9,11 +9,13 @@
 */

use Application\Entity\Db\EtablissementRattachement;
use Application\Entity\Db\TypeStructure;
use Application\Entity\Db\UniteRecherche;

$this->headTitle('Details de l\'unité de recherche ['.$unite->getLibelle().']');

$canEdit = true;
$canAddRole =true;
?>

<h1 class="page-header">
@@ -34,6 +36,17 @@ $canEdit = true;
    </a>
<?php endif; ?>

<?php if ($canAddRole && empty($roleListing)): ?>
    <a
            href="<?php echo $this->url('structure/generer-roles-defauts',
                ['id' => $unite->getStructure()->getId(), 'type' => TypeStructure::CODE_UNITE_RECHERCHE], [], true);?>"
            class="btn btn-warning"
    >
        <span class="glyphicon glyphicon-refresh"></span>
        Générer rôles par défaut
    </a>
<?php endif; ?>


<div>
    <h2>