From be7dc741052b16f20f25df2eff5a0af2c524b72e Mon Sep 17 00:00:00 2001 From: Giga Chubinidze Date: Mon, 22 May 2023 14:09:14 +0400 Subject: [PATCH] Archived breadcrumbs fix [SCI-8488] [SCI-8404] --- app/views/shared/navigation/_breadcrumbs.html.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/shared/navigation/_breadcrumbs.html.erb b/app/views/shared/navigation/_breadcrumbs.html.erb index d71d318ed..8182c2b8c 100644 --- a/app/views/shared/navigation/_breadcrumbs.html.erb +++ b/app/views/shared/navigation/_breadcrumbs.html.erb @@ -1,5 +1,6 @@ <% if @breadcrumbs_items&.length %> - <% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if item[:archived] }%> + <% archived_exists = @breadcrumbs_items.any? { |item| item[:archived] } %> + <% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if archived_exists } %> <% shortened = @breadcrumbs_items.length > 4 %> <% if shortened %>