mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 11:45:18 +08:00
Add helper method to show grey layout background [SCI-9406]
This commit is contained in:
parent
9966229324
commit
dd34e72fb9
2 changed files with 14 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -69,15 +69,7 @@
|
|||
<span style="display: none;" data-hook="application-body-html"></span>
|
||||
|
||||
<div class="sci--layout"
|
||||
data-grey-background="<%= [
|
||||
'my_modules/protocols',
|
||||
'my_modules/signatures',
|
||||
'my_modules/activities',
|
||||
'results/index',
|
||||
'protocols/show',
|
||||
'organization/index'
|
||||
].include?(controller_name + '/' + action_name)
|
||||
%>"
|
||||
data-grey-background="<%= show_grey_background? %>"
|
||||
data-breadcrumbs-collapsed="<%= !@breadcrumbs_items.present? %>"
|
||||
data-navigator-collapsed="<%= !@navigator || session[:navigator_collapsed] %>"
|
||||
data-left-navigation-collapsed=<%= !user_signed_in? %>
|
||||
|
|
Loading…
Reference in a new issue