From 25a4f2a7e3c451273936cf166e65340af1aa2837 Mon Sep 17 00:00:00 2001
From: Olivia206 <olivia.simonet@mmibordeaux.com>
Date: Wed, 29 Jun 2022 16:21:09 +0200
Subject: [PATCH] Added photo boolean to organization chart

---
 app/models/communication/block/template/organization_chart.rb | 1 +
 .../blocks/templates/organization_chart/_edit.html.erb        | 1 +
 config/locales/communication/en.yml                           | 2 ++
 config/locales/communication/fr.yml                           | 4 +++-
 4 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/app/models/communication/block/template/organization_chart.rb b/app/models/communication/block/template/organization_chart.rb
index 24fd903a2..334d745ed 100644
--- a/app/models/communication/block/template/organization_chart.rb
+++ b/app/models/communication/block/template/organization_chart.rb
@@ -3,5 +3,6 @@ class Communication::Block::Template::OrganizationChart < Communication::Block::
   has_elements
   has_component :description, :rich_text
   has_component :with_link, :boolean
+  has_component :with_photo, :boolean
 
 end
diff --git a/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb b/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb
index ca3ff8574..6f6e48d65 100644
--- a/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb
+++ b/app/views/admin/communication/blocks/templates/organization_chart/_edit.html.erb
@@ -5,6 +5,7 @@
   <div class="col-xl-6">
     <label class="form-label">&nbsp;</label>
     <%= block_component_edit :with_link %>
+    <%= block_component_edit :with_photo %>
   </div>
 </div>
 
diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml
index 1d1f2a9ef..4715f3fe5 100644
--- a/config/locales/communication/en.yml
+++ b/config/locales/communication/en.yml
@@ -283,6 +283,8 @@ en:
                 label: Description
               with_link:
                 label: With clickable links to the person's page?
+              with_photo:
+                label: With a portrait for each person?
               element:
                 person:
                   label: Person
diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml
index 81ffb0272..964ed1199 100644
--- a/config/locales/communication/fr.yml
+++ b/config/locales/communication/fr.yml
@@ -282,7 +282,9 @@ fr:
               drag_title: Glisser-déposer pour organiser les personnes
               delete_title: Enlever la personne
               with_link:
-                label: Avec des liens cliquables vers les pages des personnes ?
+                label: Avec des liens cliquables vers les pages des personnes ?
+              with_photo:
+                label: Avec un portrait de chaque personne ?
               description:
                 label: Description
               element:
-- 
GitLab