diff --git a/module/Application/config/modulateur.config.php b/module/Application/config/modulateur.config.php
index bcd95aec5098bf8367962a3430f517dc49f13f6f..ff697272ed243fb4a10f1876837e5e63768e22e1 100644
--- a/module/Application/config/modulateur.config.php
+++ b/module/Application/config/modulateur.config.php
@@ -76,9 +76,10 @@ return [
                     'type-modulateur-structure-saisie' => [
                         'type'          => 'Segment',
                         'options'       => [
-                            'route'       => '/type-modulateur-structure-saisie/:typeModulateur',
+                            'route'       => '/type-modulateur-structure-saisie/:typeModulateur[/:typeModulateurStructure]',
                             'constraints' => [
                                 'typeModulateur' => '[0-9]*',
+                                'typeModulateurStructure' => '[0-9]*',
                             ],
                             'defaults'    => [
                                 'action' => 'type-modulateur-structure-saisie',
diff --git a/module/Application/src/Application/Controller/ModulateurController.php b/module/Application/src/Application/Controller/ModulateurController.php
index b2d800cf3cce800c4dd5c79cb07a36802b327773..f48fe7b03405e22f04c9369253cddde8bd3d10a9 100755
--- a/module/Application/src/Application/Controller/ModulateurController.php
+++ b/module/Application/src/Application/Controller/ModulateurController.php
@@ -42,15 +42,16 @@ class modulateurController extends AbstractController
         $this->em()->getFilters()->enable('historique')->init([
             TypeModulateurStructure::class,
         ]);
-        $modulateurs     = $this->getServiceModulateur()->getList();
-        $typeModulateurs = $this->getServiceTypeModulateur()->getList();
+        $anneeId = $this->getServiceContext()->getAnnee()->getId();
+        $modulateurs              = $this->getServiceModulateur()->getList();
+        $typeModulateurs          = $this->getServiceTypeModulateur()->getList();
         $typeModulateurStructures = $this->getServiceTypeModulateurStructure()->getList();
 
 
-        $role        = $this->getServiceContext()->getSelectedIdentityRole();
-        $structure   = $role->getStructure();
+        $role      = $this->getServiceContext()->getSelectedIdentityRole();
+        $structure = $role->getStructure();
 
-        return compact('modulateurs', 'typeModulateurs','typeModulateurStructures','structure');
+        return compact('modulateurs', 'typeModulateurs', 'typeModulateurStructures', 'structure', 'anneeId');
     }
 
 
@@ -142,47 +143,54 @@ class modulateurController extends AbstractController
 
         return new MessengerViewModel(compact('typeModulateur'));
     }
+
+
+
     public function typeModulateurStructureSaisieAction()
     {
         /* @var $typeModulateurStructure typeModulateurStructure */
         /* @var $typeModulateur typeModulateur */
         $typeModulateur = $this->getEvent()->getParam('typeModulateur');
+        $typeModulateurStructure = $this->getEvent()->getParam('typeModulateurStructure');
 
-        $form = $this->getFormTypeModulateurStructureSaisie();
-  //      if (empty($typeModulateurStructure)) {
-            $title          = 'Création d\'un nouveau Type de Modulateur de Structure';
+        $form                    = $this->getFormTypeModulateurStructureSaisie();
+        if (empty($typeModulateurStructure)) {
+            $title                   = 'Ajout d\'une structure pour le type de modulateur';
             $typeModulateurStructure = $this->getServiceTypeModulateurStructure()->newEntity()
                 ->setTypeModulateur($typeModulateur);
-            //    } else {
-            //$title = 'Édition d\'un Type de Modulateur pour une structure';
-        //}
+        } else {
+            $title = 'Édition d\'une sructure pour le type de modulateur';
+        }
 
         $form->bindRequestSave($typeModulateurStructure, $this->getRequest(), function (typeModulateurStructure $tms) {
-            try {
-                $this->getServiceTypeModulateurStructure()->save($tms);
-                $this->flashMessenger()->addSuccessMessage('Enregistrement effectué');
-            } catch (\Exception $e) {
-                $e = DbException::translate($e);
-                $this->flashMessenger()->addErrorMessage($e->getMessage() . ':' . $tms->getId().':'.$tms->getTypeModulateur());
-            }
+            try{
+            $this->getServiceTypeModulateurStructure()->save($tms);
+            $this->flashMessenger()->addSuccessMessage('Enregistrement effectué');
+        } catch (\Exception $e) {
+        $e = DbException::translate($e);
+        $this->flashMessenger()->addErrorMessage($e->getMessage() . ':' . $tms->getId() . ':' . $tms->getTypeModulateur());
+    }
         });
 
-        return compact('form', 'title');
-    }
+return compact('form', 'title');
+}
 
 
 
-    public function typeModulateurStructureDeleteAction()
-    {
-        /* @var $typeModulateurStructure typeModulateurStructure */
-        $typeModulateurStructure = $this->getEvent()->getParam('typeModulateurStructure');
-        try {
-            $this->getServiceTypeModulateurStructure()->delete($typeModulateurStructure);
-            $this->flashMessenger()->addSuccessMessage("Type de Modulateur de structure supprimé avec succès.");
-        } catch (\Exception $e) {
-            $this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
-        }
 
-        return new MessengerViewModel(compact('typeModulateur'));
+
+public
+function typeModulateurStructureDeleteAction()
+{
+    /* @var $typeModulateurStructure typeModulateurStructure */
+    $typeModulateurStructure = $this->getEvent()->getParam('typeModulateurStructure');
+    try {
+        $this->getServiceTypeModulateurStructure()->delete($typeModulateurStructure);
+        $this->flashMessenger()->addSuccessMessage("Type de Modulateur de structure supprimé avec succès.");
+    } catch (\Exception $e) {
+        $this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
     }
+
+    return new MessengerViewModel(compact('typeModulateur'));
+}
 }
\ No newline at end of file
diff --git a/module/Application/src/Application/Service/TypeModulateurStructureService.php b/module/Application/src/Application/Service/TypeModulateurStructureService.php
index a555d31aec60742913a25b8e39cf580668b24897..2fcd6ebdfb469133b9f5513274e0fa262df34434 100644
--- a/module/Application/src/Application/Service/TypeModulateurStructureService.php
+++ b/module/Application/src/Application/Service/TypeModulateurStructureService.php
@@ -4,13 +4,14 @@ namespace Application\Service;
 
 use Application\Entity\Db\TypeModulateurStructure;
 use Application\Service\Traits\TypeModulateurStructureServiceAwareTrait;
-
+use Doctrine\ORM\QueryBuilder;
 /**
  * Description of TypeModulateurStructureService
  */
 class TypeModulateurStructureService extends AbstractEntityService
 {
-use TypeModulateurStructureServiceAwareTrait;
+    use TypeModulateurStructureServiceAwareTrait;
+
     /**
      * Liste des types de modulateur par structure
      *
@@ -43,4 +44,75 @@ use TypeModulateurStructureServiceAwareTrait;
         return 'tmd';
     }
 
+
+
+    public function existe(TypeModulateurStructure $tms)
+    {
+        /* @var $tbltms typeModulateurStructure[] */
+        /* @var $elt typeModulateurStructure */
+        if (!$tms->getId()) {
+            $dql = "
+        SELECT
+          m
+        FROM
+          Application\Entity\Db\TypeModulateurStructure m
+        WHERE
+        m.histoDestruction IS NULL
+        AND m.typeModulateur = :typemodulateur
+        AND m.structure = :structure";
+
+            $query = $this->getEntityManager()->createQuery($dql);
+        } else {
+            $dql = "
+        SELECT
+          m
+        FROM
+          Application\Entity\Db\TypeModulateurStructure m
+        WHERE
+        m.histoDestruction IS NULL
+        AND m.id != :id
+        AND m.typeModulateur = :typemodulateur
+        AND m.structure = :structure";
+
+            $query = $this->getEntityManager()->createQuery($dql);
+            $query->setParameter('id', $tms->getId());
+        }
+        $query->setParameter('typemodulateur', $tms->getTypeModulateur());
+        $query->setParameter('structure', $tms->getStructure());
+        $tbltms = $query->getResult();
+        // recherche de doublon
+        $ok  = true;
+        foreach ($tbltms as $elt) {
+            if (((!$elt->getAnneeDebut()) or (!$tms->getAnneeFin()) or ($elt->getAnneeDebut()->getId() <= $tms->getAnneeFin()->getId())) and ((!$elt->getAnneeFin())
+                    or (!$tms->getAnneeDebut()) or ($elt->getAnneeFin()->getId() >= $tms->getAnneeDebut()->getId()))) {
+                $ok = false;
+            }
+        }
+
+        return $ok;
+    }
+
+
+
+    /**
+     * @param TypeModulateurStructure $entity
+     *
+     * @return TypeModulateurStructure
+     */
+    public function save($entity)
+    {
+        if (!$this->existe($entity)) {
+            throw new \Exception('Une règle existe déjà pour cet intervalle d\'années choisi dans cette composante!');
+        }
+
+        return parent::save($entity);
+    }
+
+    public function getList( QueryBuilder $qb=null, $alias=null )
+    {
+        list($qb,$alias) = $this->initQuery($qb, $alias);
+        $qb->addOrderBy("$alias.structure");
+        $qb->addOrderBy("$alias.anneeDebut");
+        return parent::getList($qb, $alias);
+    }
 }
\ No newline at end of file
diff --git a/module/Application/view/application/modulateur/index.phtml b/module/Application/view/application/modulateur/index.phtml
index 40a921fd53d0cb1184b54b6551c40db94886de97..2d8d777a0e49569259c0d22efa3eb7c5e8cc3ed1 100644
--- a/module/Application/view/application/modulateur/index.phtml
+++ b/module/Application/view/application/modulateur/index.phtml
@@ -1,4 +1,6 @@
 <?php
+
+
 /**
  * @var $this                     \Application\View\Renderer\PhpRenderer
  * @var $modulateurs              \Application\Entity\Db\modulateur[]
@@ -20,7 +22,8 @@ $this->headTitle()->append("Modulateurs des taux horaires");
 $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MODULATEUR_EDITION));
 
 ?>
-<h1 class="page-header">Modulateurs des taux horaires</h1>
+<h1 class="page-header">Modulateurs des taux horaires
+    <?= $anneeId ?></h1>
 <?php
 foreach ($typeModulateurs as $tm) {
     if ($this->isAllowed($tm, Privileges::MODULATEUR_VISUALISATION)) { ?>
@@ -31,12 +34,11 @@ foreach ($typeModulateurs as $tm) {
                     <span style="position:absolute; right: 50px;">
 
         <?php if ($canEdit): ?>
-            <a class="ajax-modal" data-event="modulateur-saisie"
-               href="<?= $this->url('modulateur/saisie', ['typeModulateur' => $tm->getId()]) ?>"
-               title="Ajouter un modulateur">
+                        <a class="ajax-modal" data-event="modulateur-saisie"
+                           href="<?= $this->url('modulateur/saisie', ['typeModulateur' => $tm->getId()]) ?>"
+                           title="Ajouter un modulateur">
                 <span class="glyphicon glyphicon-plus"></span>
             </a>
-        <?php endif ?>
                         <a class="ajax-modal" data-event="modulateur-saisie"
                            href="<?= $this->url('modulateur/type-modulateur-saisie', ['typeModulateur' => $tm->getId()]) ?>"
                            title="Modifier le type de modulateur">
@@ -54,6 +56,7 @@ foreach ($typeModulateurs as $tm) {
         </a>
                 </span>
                 </div>
+                <?php endif ?>
             </div>
             <div class="panel-body">
                 <div class="row">
@@ -70,47 +73,53 @@ foreach ($typeModulateurs as $tm) {
                             <div class="col-md-9">Saisie par ens:</div>
                             <div class="col-md-3"><?= affBooleen($tm->getSaisieParEnseignant()) ?></div>
                         </div>
-                        <table class="table table-bordered">
-                        <?php foreach ($typeModulateurStructures
-                                       as $tms) { ?>
-                            <?php if ($tm->getId() == $tms->getTypeModulateur()->getId()) { ?>
-                                <tr>
-                                    <td>
-                                        <?php if (($tms->getAnneeDebut()) || ($tms->getAnneeFin())) {
-                                            if (!$tms->getAnneeDebut()) {
-                                                $infoBulle = ' à ' . $tms->getAnneeFin();
-                                            } else {
-                                                if (!$tms->getAnneeFin()) {
-                                                    $infoBulle = ' de ' . $tms->getAnneeDebut();
-                                                } else $infoBulle = ' de ' . $tms->getAnneeDebut() . ' à ' . $tms->getAnneeFin();
-                                            }
-                                        } else $infoBulle = ''; ?>
-                                        <?php echo ($infoBulle ? '<abbr title="' . $infoBulle . '">' : '') . $tms->getStructure()->getLibelleCourt();
-                                        echo($infoBulle ? '</abbr>' : '');
-                                        if ($canEdit) { ?>
-                                            <a style="position:absolute; right: 20px;" pop-ajax"
-                                               href="<?= $this->url('modulateur/type-modulateur-structure-delete', ['typeModulateurStructure' => $tms->getId()]) ?>"
-                                               title="Supprimer le type de modulateur pour la structure"
-                                               data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>"
-                                               data-confirm="true"
-                                               data-confirm-button="Oui"
-                                               data-cancel-button="Non"
-                                               data-submit-reload="true"
-                                            >
-                                                <span class="glyphicon glyphicon-remove text-danger"></span>
-                                            </a>
-                                        <?php } ?>
-                                    </td>
-                                </tr>
-                            <?php }
-                        } ?>
+                        <table class="table table-bordered table-condensed">
+                            <?php foreach ($typeModulateurStructures
+                                           as $tms) { ?>
+                                <?php if (($tm->getId() == $tms->getTypeModulateur()->getId()) && ((!$tms->getAnneeDebut()) || ($tms->getAnneeDebut()->getId() <= $anneeId)) && ((!$tms->getAnneeFin()) || ($tms->getAnneeFin()->getId() >= $anneeId))) { ?>
+                                    <tr>
+                                        <td>
+                                            <?php if (($tms->getAnneeDebut()) || ($tms->getAnneeFin())) {
+                                                if (!$tms->getAnneeDebut()) {
+                                                    $infoBulle = ' à ' . $tms->getAnneeFin();
+                                                } else {
+                                                    if (!$tms->getAnneeFin()) {
+                                                        $infoBulle = ' de ' . $tms->getAnneeDebut();
+                                                    } else $infoBulle = ' de ' . $tms->getAnneeDebut() . ' à ' . $tms->getAnneeFin();
+                                                }
+                                            } else $infoBulle = ''; ?>
+                                            <?php echo ($infoBulle ? '<abbr title="' . $infoBulle . '">' : '') . $tms->getStructure()->getLibelleCourt();
+                                            echo($infoBulle ? '</abbr>' : '');
+                                            if ($canEdit) { ?>
+                                                <a style="position:absolute; right:36px; " class="ajax-modal"
+                                                   data-event="modulateur-saisie"
+                                                   href="<?= $this->url('modulateur/type-modulateur-structure-saisie', ['typeModulateur' => $tm->getId(), 'typeModulateurStructure' => $tms->getId()]) ?>"
+                                                   title="Ajouter un type de modulateur pour une structure">
+                                                    <span class="glyphicon glyphicon-edit"></span>
+                                                </a>
+                                                <a style="position:absolute; right:20px; " class="pop-ajax"
+                                                   href="<?= $this->url('modulateur/type-modulateur-structure-delete', ['typeModulateurStructure' => $tms->getId()]) ?>"
+                                                   title="Supprimer le type de modulateur pour la structure"
+                                                   data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>"
+                                                   data-confirm="true"
+                                                   data-confirm-button="Oui"
+                                                   data-cancel-button="Non"
+                                                   data-submit-reload="true"
+                                                >
+                                                    <span class="glyphicon glyphicon-remove"></span>
+                                                </a>
+                                            <?php } ?>
+                                        </td>
+                                    </tr>
+                                <?php }
+                            } ?>
                         </table>
                         <?php if ($canEdit) { ?>
                             <a class="ajax-modal" data-event="modulateur-saisie"
-                                       href="<?= $this->url('modulateur/type-modulateur-structure-saisie', ['typeModulateur' => $tm->getId()]) ?>"
-                                       title="Ajouter un type de modulateur pour une structure">
-                                        <button type="button" class="btn-xs btn-primary">Ajouter</button>
-                                    </a>
+                               href="<?= $this->url('modulateur/type-modulateur-structure-saisie', ['typeModulateur' => $tm->getId()]) ?>"
+                               title="Ajouter un type de modulateur pour une structure">
+                                <button type="button" class="btn-xs btn-primary">Ajouter une structure</button>
+                            </a>
                         <?php } ?>
                     </div>
                     <div class="col-md-9">