mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 13:13:22 +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
|
def name_with_label
|
||||||
raise NotImplementedError, "Archivable model must implement the '.archived_branch?' method!" unless respond_to?(:archived_branch?)
|
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
|
end
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<div class="dropdown-header">
|
<div class="dropdown-header">
|
||||||
<h2 class="protocol-name">
|
<h2 class="protocol-name">
|
||||||
<%= @protocol.name_with_label %> <%= @protocol.parent&.name || @protocol.name %>
|
<%= @protocol.name_with_label %>
|
||||||
</h2>
|
</h2>
|
||||||
<% if @protocol.linked? %>
|
<% if @protocol.linked? %>
|
||||||
<div class="protocol-header-info">
|
<div class="protocol-header-info">
|
||||||
|
|
|
@ -431,7 +431,7 @@ en:
|
||||||
step_url: "Go to step"
|
step_url: "Go to step"
|
||||||
|
|
||||||
labels:
|
labels:
|
||||||
archived: "(A)"
|
archived: "(A) "
|
||||||
|
|
||||||
projects:
|
projects:
|
||||||
index:
|
index:
|
||||||
|
|
Loading…
Reference in a new issue