From 278adba4336a8f61510493f206b8dd2e608b1ea5 Mon Sep 17 00:00:00 2001
From: Olivia206 <olivia.simonet@mmibordeaux.com>
Date: Mon, 17 Apr 2023 15:16:45 +0200
Subject: [PATCH] fixed conditions for main description

---
 .../communication/blocks/templates/pages/_preview.html.erb      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb
index 85c564f69..093f0ee87 100644
--- a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb
+++ b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb
@@ -15,7 +15,7 @@ class_name += " block-pages--" + @block.template.layout
             <% if @block.template.layout === "cards" || @block.template.layout === "list" %>
               <h2><%= link_to @block.template.page, @block.template.page.url %></h2>
             
-            <% elsif @block.template.layout === "grid" && @block.template.page %>
+            <% elsif @block.template.layout === "grid" && @block.template.page && @block.template.show_main_description %>
               <h2><%= link_to @block.title, @block.template.page.url %></h2>
               <p class="description"><%= @block.template.page.summary %></p>
 
-- 
GitLab