mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-25 16:24:27 +08:00
Fix hound [SCI-8030]
This commit is contained in:
parent
443ee4350c
commit
248b13aa72
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ProtocolsHelper
|
||||
def templates_view_mode_archived?
|
||||
@type == :archived || @protocol&.archived?
|
||||
def templates_view_mode_archived?(type: nil, protocol: nil)
|
||||
type == :archived || protocol&.archived?
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<ul class="sidebar-branch">
|
||||
<% if templates_view_mode_archived? %>
|
||||
<% if templates_view_mode_archived?(type: @type, protocol: @protocol) %>
|
||||
<li class="sidebar-leaf">
|
||||
<%= link_to protocols_path, class: "sidebar-link back-button" do %>
|
||||
<%= t("protocols.index.back_to_active_protocols") %>
|
||||
|
|
Loading…
Reference in a new issue