From 7284b569a58166bd4d4c80ac2a6b37406dd1b3e3 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Fri, 29 May 2026 15:55:48 +0200 Subject: [PATCH 1/2] badge --- app/views/admin/communication/websites/show.html.erb | 2 +- app/views/admin/communication/websites/show/_badge.html.erb | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 app/views/admin/communication/websites/show/_badge.html.erb diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index 13981d3e26..ed5b6c302a 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -57,7 +57,7 @@ <%= render 'admin/application/l10n/widget', about: @website, l10n: @l10n %> -<%= image_tag @website.deployment_status_badge, alt: '' if @website.deployment_status_badge.present? %> +<%= render 'admin/communication/websites/show/badge' %> <% content_for :server_admin_only do %> <%= static_link static_admin_communication_website_path(@website, website_id: nil) %> diff --git a/app/views/admin/communication/websites/show/_badge.html.erb b/app/views/admin/communication/websites/show/_badge.html.erb new file mode 100644 index 0000000000..b5f01b0681 --- /dev/null +++ b/app/views/admin/communication/websites/show/_badge.html.erb @@ -0,0 +1,5 @@ +<% if @website.deployment_status_badge.present? && @website.git_repository.present? %> + <%= link_to @website.repository_url, target: :_blank do %> + <%= image_tag @website.deployment_status_badge, alt: '' %> + <% end %> +<% end %> From 674c7fc5cba347bb9de6a763c9ffec2cf9c35084 Mon Sep 17 00:00:00 2001 From: Arnaud Levy Date: Mon, 1 Jun 2026 10:50:32 +0200 Subject: [PATCH 2/2] Fix --- app/views/admin/communication/websites/show.html.erb | 2 +- app/views/admin/communication/websites/show/_badge.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/admin/communication/websites/show.html.erb b/app/views/admin/communication/websites/show.html.erb index ed5b6c302a..38e8855ac8 100644 --- a/app/views/admin/communication/websites/show.html.erb +++ b/app/views/admin/communication/websites/show.html.erb @@ -57,7 +57,7 @@ <%= render 'admin/application/l10n/widget', about: @website, l10n: @l10n %> -<%= render 'admin/communication/websites/show/badge' %> +<%= render 'admin/communication/websites/show/badge', website: @website %> <% content_for :server_admin_only do %> <%= static_link static_admin_communication_website_path(@website, website_id: nil) %> diff --git a/app/views/admin/communication/websites/show/_badge.html.erb b/app/views/admin/communication/websites/show/_badge.html.erb index b5f01b0681..f667b43c8f 100644 --- a/app/views/admin/communication/websites/show/_badge.html.erb +++ b/app/views/admin/communication/websites/show/_badge.html.erb @@ -1,5 +1,5 @@ -<% if @website.deployment_status_badge.present? && @website.git_repository.present? %> - <%= link_to @website.repository_url, target: :_blank do %> - <%= image_tag @website.deployment_status_badge, alt: '' %> +<% if website.deployment_status_badge.present? && website.git_repository.present? %> + <%= link_to website.repository_url, target: :_blank do %> + <%= image_tag website.deployment_status_badge, alt: '' %> <% end %> <% end %>