diff --git a/app/models/communication/website.rb b/app/models/communication/website.rb
index 4217d8a6c..3d28764e1 100644
--- a/app/models/communication/website.rb
+++ b/app/models/communication/website.rb
@@ -106,6 +106,7 @@ class Communication::Website < ApplicationRecord
include WithScreenshot
include WithSecurity
include WithShowcase
+ include WithStatusBadge
include WithStyle
include WithTheme
include WithTimeZone
diff --git a/app/models/communication/website/with_status_badge.rb b/app/models/communication/website/with_status_badge.rb
new file mode 100644
index 000000000..810bf72df
--- /dev/null
+++ b/app/models/communication/website/with_status_badge.rb
@@ -0,0 +1,11 @@
+module Communication::Website::WithStatusBadge
+ extend ActiveSupport::Concern
+
+ def status_badge?
+ kelmscott_active? || deployment_status_badge.present?
+ end
+
+ def status_badge_url
+ kelmscott_active? ? kelmscott_badge_url : deployment_status_badge
+ end
+end
diff --git a/app/views/admin/communication/websites/show/_badge.html.erb b/app/views/admin/communication/websites/show/_badge.html.erb
index 5f70dc42d..5078313f7 100644
--- a/app/views/admin/communication/websites/show/_badge.html.erb
+++ b/app/views/admin/communication/websites/show/_badge.html.erb
@@ -1,28 +1,26 @@
<% if website.repository.present? %>
- <% if website.kelmscott_active? %>
- -
- <%= image_tag website.kelmscott_badge_url, alt: '' %>
-
- <% if can?(:kelmscott_publish, website) %>
+ <% if website.status_badge? %>
-
- <%= link_to t('admin.communication.website.kelmscott_publish.button'),
- kelmscott_publish_admin_communication_website_path(website),
- method: :post,
- class: 'action' %>
+ <%= image_tag website.status_badge_url, alt: '' %>
+
+ <% end %>
+ <% if website.kelmscott_active? %>
+ <% if can?(:kelmscott_publish, website) %>
+ -
+ <%= link_to t('admin.communication.website.kelmscott_publish.button'),
+ kelmscott_publish_admin_communication_website_path(website),
+ method: :post,
+ class: 'action' %>
+
+ <% end %>
+ -
+ <%= link_to t('admin.communication.website.kelmscott_publish.show_logs'),
+ website.kelmscott_url,
+ target: :_blank,
+ class: 'action' %>
<% end %>
- -
- <%= link_to t('admin.communication.website.kelmscott_publish.show_logs'),
- website.kelmscott_url,
- target: :_blank,
- class: 'action' %>
-
- <% elsif website.deployment_status_badge.present? %>
- -
- <%= image_tag website.deployment_status_badge, alt: '' %>
-
- <% end %>
-
<%= link_to t('admin.communication.website.show_repository'),
website.repository_url,
diff --git a/app/views/server/websites/_list.html.erb b/app/views/server/websites/_list.html.erb
index 126e7fe59..17422df23 100644
--- a/app/views/server/websites/_list.html.erb
+++ b/app/views/server/websites/_list.html.erb
@@ -35,8 +35,7 @@
target: :_blank,
class: 'action' if website.repository.present? %>
-
| <%= image_tag website.deployment_status_badge,
- alt: '' if website.deployment_status_badge.present? %> |
+ <%= image_tag website.status_badge_url, alt: '' if website.status_badge? %> |
<%= website.theme_version %>
<%= link_to t('server_admin.websites.buttons.theme.sync'),
|