From 443ee4350c9788d7dd97fed1ec4e73b25b1d2d60 Mon Sep 17 00:00:00 2001 From: sboursen-scinote Date: Fri, 3 Mar 2023 14:11:40 +0100 Subject: [PATCH 1/2] Fix protocol repository sidebar on archived view [SCI-8030] --- app/helpers/protocols_helper.rb | 5 +++ app/views/protocols/index.html.erb | 2 +- .../sidebar/_templates_sidebar.html.erb | 42 +++++++++++-------- config/locales/en.yml | 1 + 4 files changed, 32 insertions(+), 18 deletions(-) create mode 100644 app/helpers/protocols_helper.rb diff --git a/app/helpers/protocols_helper.rb b/app/helpers/protocols_helper.rb new file mode 100644 index 000000000..2c55df16d --- /dev/null +++ b/app/helpers/protocols_helper.rb @@ -0,0 +1,5 @@ +module ProtocolsHelper + def templates_view_mode_archived? + @type == :archived || @protocol&.archived? + end +end diff --git a/app/views/protocols/index.html.erb b/app/views/protocols/index.html.erb index f0443456b..b0b51450c 100644 --- a/app/views/protocols/index.html.erb +++ b/app/views/protocols/index.html.erb @@ -14,7 +14,7 @@