(A) label for archived projects, inventories and protocol tempates in breadcrumbs [SCI-8404]

This commit is contained in:
Giga Chubinidze 2023-05-23 11:57:50 +04:00
parent cf6a901b67
commit 7b158d7935

View file

@ -1,6 +1,6 @@
<% if @breadcrumbs_items&.length %>
<% archived_exists = @breadcrumbs_items.any? { |item| item[:archived] } %>
<% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if archived_exists } %>
<% @breadcrumbs_items.each { |item| item[:label] = "(A) #{item[:label]}" if archived_exists || request.fullpath.include?('archived') } %>
<% shortened = @breadcrumbs_items.length > 4 %>
<% if shortened %>
@ -58,6 +58,7 @@
</span>
<% end %>
<% last_item[:label] = "(A) #{last_item[:label]}" if request.fullpath.include?('archived') && !last_item[:label].include?("(A)") %>
<span class="breadcrumbs-link" title="<%= last_item[:label] %>">
<%= last_item[:label] %>
</span>