From dd34e72fb9df229c89f9990333afc553bd1fcfcd Mon Sep 17 00:00:00 2001 From: wandji20 Date: Fri, 29 Sep 2023 12:49:12 +0100 Subject: [PATCH] Add helper method to show grey layout background [SCI-9406] --- app/helpers/application_helper.rb | 13 +++++++++++++ app/views/layouts/application.html.erb | 10 +--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 1f5d3ae55..30169b711 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -236,4 +236,17 @@ module ApplicationHelper # login_disclaimer: { title: "...", body: "...", action: "..." } ApplicationSettings.instance.values['login_disclaimer'] end + + def show_grey_background? + return false unless controller_name && action_name + + %w( + my_modules/protocols + my_modules/signatures + my_modules/activities + results/index + protocols/show + organization/index + ).include?("#{controller_name}/#{action_name}") + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 838f27bb6..f6727870f 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -69,15 +69,7 @@