From 90203ea254ad06ee570f4907e555ded93eed60f9 Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Sat, 22 Jul 2023 07:58:20 +0200
Subject: [PATCH] wip

---
 .../admin/communication/websites/show/_posts.html.erb      | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/app/views/admin/communication/websites/show/_posts.html.erb b/app/views/admin/communication/websites/show/_posts.html.erb
index e46152ab6..ba64d41ac 100644
--- a/app/views/admin/communication/websites/show/_posts.html.erb
+++ b/app/views/admin/communication/websites/show/_posts.html.erb
@@ -6,7 +6,12 @@ action += link_to t('create'),
 action += link_to t('communication.website.posts.new_curation'),
                   new_admin_communication_website_post_curation_path(website_id: @website.id),
                   class: button_classes('ms-2 btn-light') if can?(:create, Communication::Website::Post)
-subtitle = link_to t('communication.website.see_all', number: @all_posts.size), admin_communication_website_posts_path(website_id: @website)
+          
+subtitle = ''
+if @all_posts.any? 
+  subtitle = link_to  t('communication.website.see_all', number: @all_posts.size), 
+                      admin_communication_website_posts_path(website_id: @website)
+end
 %>
 <%= osuny_panel t('communication.website.last_posts'),
                 subtitle: subtitle,
-- 
GitLab