From 438e58569143776e21167b60cdafc39e87c60b00 Mon Sep 17 00:00:00 2001
From: alexisben <alex@noesya.coop>
Date: Wed, 8 Mar 2023 18:37:54 +0100
Subject: [PATCH] test style

---
 .../blocks/templates/embed/_preview.html.erb  | 21 +++++++++++--------
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/app/views/admin/communication/blocks/templates/embed/_preview.html.erb b/app/views/admin/communication/blocks/templates/embed/_preview.html.erb
index 2e2464610..9403596fa 100644
--- a/app/views/admin/communication/blocks/templates/embed/_preview.html.erb
+++ b/app/views/admin/communication/blocks/templates/embed/_preview.html.erb
@@ -14,16 +14,19 @@
         </div>
       <% end %>
 
-      <%= block_component_preview :code %>
+      <%= raw @block.template.code %>
+      <%# <%= block_component_preview :code %> <%# Ƨa ne fonctionne pas %>
 
-      <div class="transcription">
-        <details>
-          <summary>Transcription</summary>
-          <p>
-            <%= block_component_preview :transcription %>
-          </p>
-        </details>
-      </div>
+      <% unless @block.template.transcription.empty? %>
+        <div class="transcription">
+          <details>
+            <summary>Transcription</summary>
+            <p>
+              <%= block_component_preview :transcription %>
+            </p>
+          </details>
+        </div>
+      <% end %>
     </div>
   </div>
 </section>
-- 
GitLab