From 564b68f575d6cf0019f127916ebd2fb5aabc2040 Mon Sep 17 00:00:00 2001
From: Olivia206 <olivia.simonet@mmibordeaux.com>
Date: Tue, 18 Apr 2023 10:02:29 +0200
Subject: [PATCH] fixed indent

---
 .../blocks/templates/pages/_preview.html.erb  |  8 ++-
 .../blocks/templates/posts/_preview.html.erb  | 54 +++++++++----------
 2 files changed, 30 insertions(+), 32 deletions(-)

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 1c74c193f..36bf97d87 100644
--- a/app/views/admin/communication/blocks/templates/pages/_preview.html.erb
+++ b/app/views/admin/communication/blocks/templates/pages/_preview.html.erb
@@ -41,9 +41,7 @@ class_name += " block-pages--" + @block.template.layout
             <% @block.template.selected_pages.each do |page|
               next if page.nil?
             %>
-            <li>
-              <a href="<%= page.url %>"><%= page %></a>
-            </li>
+            <li><%= link_to page, page.url %></li>
             <% end %>
           </ul>
 
@@ -54,7 +52,7 @@ class_name += " block-pages--" + @block.template.layout
             %>
               <article class="card">
                 <h3>
-                  <a href="<%= page.url %>"><%= page %></a>
+                  <%= link_to page, page.url %>
                 </h3>
                 <% if @block.template.show_description %>
                   <p><%= page.summary %></p>
@@ -80,7 +78,7 @@ class_name += " block-pages--" + @block.template.layout
             %>
               <article>
                 <h3>
-                  <a href="<%= page.url %>"><%= page %></a>
+                  <%= link_to page, page.url %>  
                 </h3>
                 <% if @block.template.show_description %>
                   <p><%= page.summary %></p>
diff --git a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb
index 8c5a3d65c..da8aa8a50 100644
--- a/app/views/admin/communication/blocks/templates/posts/_preview.html.erb
+++ b/app/views/admin/communication/blocks/templates/posts/_preview.html.erb
@@ -59,37 +59,37 @@ date_format = "%e %B %Y"
       %>
         <div class="highlight">
           <div class="highlight-post">
-              <article class="post" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
-                <div class="post-content">
-                  <h3 itemprop="headline">
-                    <%= link_to highlight_post, highlight_post.url %>
-                  </h3>
-                  <% if !highlight_post.categories.empty? %>
-                    <ul class="post-categories">
-                      <% highlight_post.categories.each do |category| %>
-                        <%= link_to category, category.path %>
-                      <% end %>
-                    </ul>
-                  <% end %>
-                  <p itemprop="articleBody"><%= highlight_post.summary %></p>
-                  <div class="post-meta">
-                    <time itemprop="datePublished" datetime="<%= highlight_post.published_at %>"><%= l(highlight_post.published_at, format: date_format) %></time>
-                    <% if highlight_post.author.present? %>
-                      <div class="post-author" itemscope itemtype="https://schema.org/Person" itemprop="author">
-                        <p itemprop="name"><%= highlight_post.author %></p>
-                      </div>
+            <article class="post" itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting">
+              <div class="post-content">
+                <h3 itemprop="headline">
+                  <%= link_to highlight_post, highlight_post.url %>
+                </h3>
+                <% if !highlight_post.categories.empty? %>
+                  <ul class="post-categories">
+                    <% highlight_post.categories.each do |category| %>
+                      <%= link_to category, category.path %>
                     <% end %>
-                  </div>
-                </div>
-                <div class="media">
-                  <% if highlight_post.best_featured_image.attached? %>
-                    <%= kamifusen_tag highlight_post.best_featured_image %>
+                  </ul>
+                <% end %>
+                <p itemprop="articleBody"><%= highlight_post.summary %></p>
+                <div class="post-meta">
+                  <time itemprop="datePublished" datetime="<%= highlight_post.published_at %>"><%= l(highlight_post.published_at, format: date_format) %></time>
+                  <% if highlight_post.author.present? %>
+                    <div class="post-author" itemscope itemtype="https://schema.org/Person" itemprop="author">
+                      <p itemprop="name"><%= highlight_post.author %></p>
+                    </div>
                   <% end %>
                 </div>
-              </article>
-            </div>
+              </div>
+              <div class="media">
+                <% if highlight_post.best_featured_image.attached? %>
+                  <%= kamifusen_tag highlight_post.best_featured_image %>
+                <% end %>
+              </div>
+            </article>
+          </div>
             
-            <div class="list">
+          <div class="list">
             <% if @block.data %>
               <% @block.template.selected_posts.each do |post|
                 next if post.nil?
-- 
GitLab