mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 11:57:16 +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
|
module ProtocolsHelper
|
||||||
def templates_view_mode_archived?
|
def templates_view_mode_archived?(type: nil, protocol: nil)
|
||||||
@type == :archived || @protocol&.archived?
|
type == :archived || protocol&.archived?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<ul class="sidebar-branch">
|
<ul class="sidebar-branch">
|
||||||
<% if templates_view_mode_archived? %>
|
<% if templates_view_mode_archived?(type: @type, protocol: @protocol) %>
|
||||||
<li class="sidebar-leaf">
|
<li class="sidebar-leaf">
|
||||||
<%= link_to protocols_path, class: "sidebar-link back-button" do %>
|
<%= link_to protocols_path, class: "sidebar-link back-button" do %>
|
||||||
<%= t("protocols.index.back_to_active_protocols") %>
|
<%= t("protocols.index.back_to_active_protocols") %>
|
||||||
|
|
Loading…
Add table
Reference in a new issue