From 783d0bf80614d7a85b409d5423c1384fb19b7d3b Mon Sep 17 00:00:00 2001
From: alexisben <alexiben7@gmail.com>
Date: Tue, 19 Apr 2022 17:45:40 +0200
Subject: [PATCH] Show

---
 .../blocks/templates/pages/_show.html.erb            | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/app/views/admin/communication/blocks/templates/pages/_show.html.erb b/app/views/admin/communication/blocks/templates/pages/_show.html.erb
index c69c585bd..4ea468c6f 100644
--- a/app/views/admin/communication/blocks/templates/pages/_show.html.erb
+++ b/app/views/admin/communication/blocks/templates/pages/_show.html.erb
@@ -4,14 +4,20 @@
   <% end %>
   <% if @block.template.selected_pages.any? %>
     <div class="row">
-      <% @block.template.selected_pages.each do |page| %>
+      <% @block.template.selected_pages.each do |element| %>
         <div class="col-md-4">
           <div class="card">
             <div class="card-header">
-              <h3 class="card-title h5"><%= page %></h3>
+              <h3 class="card-title h5"><%= element.page %></h3>
             </div>
             <div class="card-body">
-              <%= page.description_short %>
+              <div class="mb-3">
+                <% if element.show_image %>
+                  <%= kamifusen_tag element.page.featured_image,
+                                    class: 'img-fluid' if element.page.featured_image.attached? && element.page.featured_image.variable? %>
+                <% end %>
+              </div>
+              <p><%= element.page.description_short if element.show_description %></p>
             </div>
           </div>
         </div>
-- 
GitLab