included name

This commit is contained in:
Giga Chubinidze 2023-06-08 12:54:01 +04:00
parent aa5caf3cc3
commit 95437c69a4
3 changed files with 5 additions and 3 deletions

View file

@ -50,7 +50,9 @@ module ArchivableModel
def name_with_label
raise NotImplementedError, "Archivable model must implement the '.archived_branch?' method!" unless respond_to?(:archived_branch?)
I18n.t("labels.archived") if self.archived_branch?
return (parent&.name || name).prepend(I18n.t("labels.archived")) if archived_branch?
parent&.name || name
end
protected

View file

@ -18,7 +18,7 @@
<div class="dropdown-content">
<div class="dropdown-header">
<h2 class="protocol-name">
<%= @protocol.name_with_label %>&nbsp;<%= @protocol.parent&.name || @protocol.name %>
<%= @protocol.name_with_label %>
</h2>
<% if @protocol.linked? %>
<div class="protocol-header-info">

View file

@ -431,7 +431,7 @@ en:
step_url: "Go to step"
labels:
archived: "(A)"
archived: "(A) "
projects:
index: