mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
included name
This commit is contained in:
parent
aa5caf3cc3
commit
95437c69a4
3 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
<div class="dropdown-content">
|
||||
<div class="dropdown-header">
|
||||
<h2 class="protocol-name">
|
||||
<%= @protocol.name_with_label %> <%= @protocol.parent&.name || @protocol.name %>
|
||||
<%= @protocol.name_with_label %>
|
||||
</h2>
|
||||
<% if @protocol.linked? %>
|
||||
<div class="protocol-header-info">
|
||||
|
|
|
@ -431,7 +431,7 @@ en:
|
|||
step_url: "Go to step"
|
||||
|
||||
labels:
|
||||
archived: "(A)"
|
||||
archived: "(A) "
|
||||
|
||||
projects:
|
||||
index:
|
||||
|
|
Loading…
Reference in a new issue