From 518bb296413ec1140f01c09805ace0a35ffbb6d3 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Tue, 21 Jun 2022 10:57:01 +0200
Subject: [PATCH] testimonials

---
 .../blocks/components/rich_text/_static.html.erb          | 7 ++++++-
 .../communication/blocks/components/text/_static.html.erb | 7 ++++++-
 .../blocks/templates/testimonials/_static.html.erb        | 8 +++-----
 3 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb
index 1d02c906d..c4afc9949 100644
--- a/app/views/admin/communication/blocks/components/rich_text/_static.html.erb
+++ b/app/views/admin/communication/blocks/components/rich_text/_static.html.erb
@@ -1,2 +1,7 @@
+<% if list %>
+<%= indentation %>- <%= property %>: >-
+<%= indentation %>    <%= prepare_html_for_static value, @university, depth + 2 %>
+<% else %>
 <%= indentation %><%= property %>: >-
-<%= indentation %>  <%= prepare_html_for_static value, @university %>
\ No newline at end of file
+<%= indentation %>  <%= prepare_html_for_static value, @university %>
+<% end %>
diff --git a/app/views/admin/communication/blocks/components/text/_static.html.erb b/app/views/admin/communication/blocks/components/text/_static.html.erb
index a05f07761..f6f87c8bd 100644
--- a/app/views/admin/communication/blocks/components/text/_static.html.erb
+++ b/app/views/admin/communication/blocks/components/text/_static.html.erb
@@ -1,2 +1,7 @@
+<% if list %>
+<%= indentation %>- <%= property %>: >-
+<%= indentation %>    <%= prepare_text_for_static value, depth + 2 %>
+<% else %>
 <%= indentation %><%= property %>: >-
-<%= indentation %>  <%= prepare_text_for_static value, depth + 1 %>
\ No newline at end of file
+<%= indentation %>  <%= prepare_text_for_static value, depth + 1 %>
+<% end %>
diff --git a/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb b/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb
index b46aa56c7..f267cde51 100644
--- a/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb
+++ b/app/views/admin/communication/blocks/templates/testimonials/_static.html.erb
@@ -1,9 +1,7 @@
       testimonials:
 <% block.template.elements.each do |element| %>
 <%= block_component_static :text, template: element, depth: 4, list: true %>
-<%= block_component_static :author, template: element, depth: 4 %>
-<%= block_component_static :job, template: element, depth: 4 %>
-<% if element.photo %>
-<%= block_component_static :photo, template: element, depth: 4 %>
-<% end %>
+<%= block_component_static :author, template: element, depth: 5 %>
+<%= block_component_static :job, template: element, depth: 5 %>
+<%= block_component_static :photo, template: element, depth: 5 if element.photo %>
 <% end %>
-- 
GitLab