mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 14:17:00 +08:00
33 lines
695 B
Ruby
33 lines
695 B
Ruby
module LeftMenuBarHelper
|
|
|
|
def dashboard_are_selected?
|
|
controller_name == 'dashboards'
|
|
end
|
|
|
|
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?
|
|
# TODO
|
|
controller_name == 'protocols' ||
|
|
controller_name == 'label_templates'
|
|
end
|
|
|
|
def reports_are_selected?
|
|
# TODO
|
|
controller_name == 'reports'
|
|
end
|
|
|
|
def settings_are_selected?
|
|
controller_name.in? %(registrations preferences addons teams connected_accounts webhooks)
|
|
end
|
|
|
|
def activities_are_selected?
|
|
controller_name == 'global_activities'
|
|
end
|
|
end
|