From 9a3f455ca6d13cdd4fb09d66207d4a6cf42ff7c8 Mon Sep 17 00:00:00 2001
From: lecluse <lecluse@d57fa8bc-6af1-4de9-8b7d-78e900e231e7>
Date: Fri, 7 Apr 2017 11:56:38 +0000
Subject: [PATCH] =?UTF-8?q?Affichage=20d'un=20message=20si=20l'intervenant?=
 =?UTF-8?q?=20a=20=C3=A9t=C3=A9=20supprim=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../Helper/Intervenant/IntervenantViewHelper.php     | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
index a38819efbd..554d9d82f7 100644
--- a/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
+++ b/module/Application/src/Application/View/Helper/Intervenant/IntervenantViewHelper.php
@@ -2,7 +2,9 @@
 
 namespace Application\View\Helper\Intervenant;
 
+use Application\Constants;
 use Application\Util;
+use UnicaenImport\Entity\Db\Source;
 use Zend\View\Helper\AbstractHtmlElement;
 use Application\Entity\Db\Intervenant;
 use Application\Entity\Db\Traits\IntervenantAwareTrait;
@@ -95,6 +97,16 @@ class IntervenantViewHelper extends AbstractHtmlElement
             $html .= "</dl>";
         }
 
+        if ($entity->getHistoDestruction()) {
+            $msg = 'Cet intervenant a été supprimé de OSE le '.$entity->getHistoDestruction()->format(Constants::DATE_FORMAT).'.';
+
+            if ($entity->getSource()->getCode() !== \Application\Service\Source::CODE_SOURCE_OSE){
+                $msg .= ' Sa fiche ne remonte plus depuis l\'application '.$entity->getSource().'.';
+            }
+
+            $html .= '<div class="alert alert-danger">'.$msg.'</div>';
+        }
+
         //$html .= $this->getView()->historique($entity); => pas de sens ici
 
         return $html;
-- 
GitLab