From e2724371398a13ebb158262fec39ee38bb65d3ac Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Fri, 3 Feb 2023 14:36:54 +0100
Subject: [PATCH] fix layout

---
 .../websites/authors/show.html.erb              | 17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/app/views/admin/communication/websites/authors/show.html.erb b/app/views/admin/communication/websites/authors/show.html.erb
index acbdfd209..5f3b06837 100644
--- a/app/views/admin/communication/websites/authors/show.html.erb
+++ b/app/views/admin/communication/websites/authors/show.html.erb
@@ -3,19 +3,12 @@
 <%= render 'admin/communication/websites/sidebar' do %>
   <%= render 'admin/university/people/main_infos', person: @author %>
 
-  <% if @posts.total_count > 0 %>
-    <div class="card">
-      <div class="card-header">
-        <h5><%= "#{Communication::Website::Post.model_name.human(count: 2)} (#{@posts.total_count})" %></h5>
-      </div>
+  <% if @posts.any? %>
+    <%= osuny_panel Communication::Website::Post.model_name.human(count: 2),
+                    subtitle: "#{@posts.total_count} #{Communication::Website::Post.model_name.human(count: @posts.total_count).downcase}" do %>
       <%= render 'admin/communication/websites/posts/list', posts: @posts, hide_author: true %>
-      <% if @posts.total_pages > 1 %>
-        <div class="card-footer">
-          <%= paginate @posts, theme: 'bootstrap-5' %>
-        </div>
-      <% end %>
-    </div>
-
+      <%= paginate @posts, theme: 'bootstrap-5' if @posts.total_pages > 1 %>
+    <% end %>
   <% end %>
 <% end %>
 
-- 
GitLab