From 0e3f0986e8c502eaed6d13052123609c76eda33b Mon Sep 17 00:00:00 2001
From: pabois <pierreandre.boissinot@noesya.coop>
Date: Thu, 23 Nov 2023 18:24:21 +0100
Subject: [PATCH] readibility

---
 app/views/admin/communication/websites/pages/show.html.erb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/views/admin/communication/websites/pages/show.html.erb b/app/views/admin/communication/websites/pages/show.html.erb
index b9567db98..69e10e492 100644
--- a/app/views/admin/communication/websites/pages/show.html.erb
+++ b/app/views/admin/communication/websites/pages/show.html.erb
@@ -49,7 +49,7 @@
   <%= link_to t('admin.communication.website.publish.button'), 
               publish_admin_communication_website_page_path(@page), 
               class: button_classes,
-              method: :post unless @page.published if can?(:publish, @page)
+              method: :post if !@page.published && can?(:publish, @page)
               # This is not edit_link @page because of the polymorphism of the special pages, which would create a wrong path               
               %>
 <% end %>
-- 
GitLab