Fix hound [SCI-8030]

This commit is contained in:
sboursen-scinote 2023-03-03 14:32:08 +01:00
parent 443ee4350c
commit 248b13aa72
2 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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") %>