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 quarantined attachments page

Behrokh Satarnejad6a91890e7e84
diff --git a/app/controllers/admin/attachments/quarantined_attachments_controller.rb b/app/controllers/admin/attachments/quarantined_attachments_controller.rb
index 8856adcce0c..6df31b1b4e8 100644
--- a/app/controllers/admin/attachments/quarantined_attachments_controller.rb
+++ b/app/controllers/admin/attachments/quarantined_attachments_controller.rb
@@ -51,12 +51,8 @@ module Admin
redirect_to action: :index
end
- def default_breadcrumb
- t("antivirus_scan.quarantined_attachments.title")
- end
-
def show_local_breadcrumb
- true
+ false
end
private
@@ -78,6 +74,13 @@ module Admin
rescue ActiveRecord::RecordNotFound
render_404
end
+
+ def breadcrumb_items
+ [{ href: admin_index_path, text: t("label_administration") },
+ { href: admin_settings_attachments_path, text: t("attributes.attachments") },
+ t("antivirus_scan.quarantined_attachments.title")]
+ end
+ helper_method :breadcrumb_items
end
end
end
diff --git a/app/views/admin/attachments/quarantined_attachments/index.html.erb b/app/views/admin/attachments/quarantined_attachments/index.html.erb
index e6d642c268b..1a8524e0dcc 100644
--- a/app/views/admin/attachments/quarantined_attachments/index.html.erb
+++ b/app/views/admin/attachments/quarantined_attachments/index.html.erb
@@ -3,9 +3,7 @@
<%=
render(Primer::OpenProject::PageHeader.new) do |header|
header.with_title(variant: :large) { t('antivirus_scan.quarantined_attachments.title') }
- header.with_breadcrumbs([{href: admin_index_path, text: t('label_administration')},
- {href: admin_settings_attachments_path, text: t('attributes.attachments')},
- t('antivirus_scan.quarantined_attachments.title')])
+ header.with_breadcrumbs(breadcrumb_items)
end
%>