Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

use one breadcrumb in virus scanning page

Behrokh Satarnejad108490dd49a1
diff --git a/app/controllers/admin/settings/virus_scanning_settings_controller.rb b/app/controllers/admin/settings/virus_scanning_settings_controller.rb
index 842990f4a72..841464c503e 100644
--- a/app/controllers/admin/settings/virus_scanning_settings_controller.rb
+++ b/app/controllers/admin/settings/virus_scanning_settings_controller.rb
@@ -33,10 +33,9 @@ module Admin::Settings
before_action :require_ee
before_action :check_clamav, only: %i[update], if: -> { scan_enabled? }
- def default_breadcrumb
- t("settings.antivirus.title")
+ def show_local_breadcrumb
+ false
end
-
def av_form
selected = params.dig(:settings, :antivirus_scan_mode)&.to_sym || :disabled
@@ -102,5 +101,12 @@ module Admin::Settings
file_count: t(:label_x_files, count: Attachment.status_quarantined.count))
redirect_to action: :show
end
+
+ def breadcrumb_items
+ [{ href: admin_index_path, text: t("label_administration") },
+ { href: admin_settings_attachments_path, text: t("attributes.attachments") },
+ t("settings.antivirus.title")]
+ end
+ helper_method :breadcrumb_items
end
end
diff --git a/app/views/admin/settings/virus_scanning_settings/show.html.erb b/app/views/admin/settings/virus_scanning_settings/show.html.erb
index 72e2e1c1e2a..1550ba9bba9 100644
--- a/app/views/admin/settings/virus_scanning_settings/show.html.erb
+++ b/app/views/admin/settings/virus_scanning_settings/show.html.erb
@@ -32,9 +32,7 @@ See COPYRIGHT and LICENSE files for more details.
<% header.with_title do %>
<%= t('settings.antivirus.title') %>
<% end %>
- <% header.with_breadcrumbs([{href: admin_index_path, text: t('label_administration')},
- {href: admin_settings_attachments_path, text: t('attributes.attachments')},
- t('settings.antivirus.title')])%>
+ <% header.with_breadcrumbs(breadcrumb_items)%>
<% end %>
<%= styled_form_tag(