scinote-web/app/helpers/left_menu_bar_helper.rb

28 lines
540 B
Ruby
Raw Normal View History

2018-03-14 21:33:34 +08:00
module LeftMenuBarHelper
def projects_are_selected?
controller_name.in? %w(projects experiments my_modules)
end
def repositories_are_selected?
controller_name == 'repositories'
end
def templates_are_selected?
2018-03-20 20:53:11 +08:00
# TODO
2018-03-14 21:33:34 +08:00
controller_name == 'protocols'
end
def reports_are_selected?
2018-03-20 20:53:11 +08:00
# TODO
2018-03-14 21:33:34 +08:00
controller_name == 'reports'
end
def settings_are_selected?
controller_name.in? %(registrations preferences addons teams)
end
def activities_are_selected?
controller_name == 'activities'
end
end