diff --git a/app/models/concerns/archivable_model.rb b/app/models/concerns/archivable_model.rb index 7e15eeac8..0a9fb2f18 100644 --- a/app/models/concerns/archivable_model.rb +++ b/app/models/concerns/archivable_model.rb @@ -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 diff --git a/app/views/my_modules/protocols/_protocol_status_bar.html.erb b/app/views/my_modules/protocols/_protocol_status_bar.html.erb index d2549b317..e695072c6 100644 --- a/app/views/my_modules/protocols/_protocol_status_bar.html.erb +++ b/app/views/my_modules/protocols/_protocol_status_bar.html.erb @@ -18,7 +18,7 @@