2018-03-14 21:33:34 +08:00
|
|
|
module LeftMenuBarHelper
|
2020-02-13 20:50:29 +08:00
|
|
|
|
|
|
|
def dashboard_are_selected?
|
|
|
|
controller_name == 'dashboards'
|
|
|
|
end
|
|
|
|
|
2018-03-14 21:33:34 +08:00
|
|
|
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
|
2022-07-26 19:52:40 +08:00
|
|
|
controller_name == 'protocols' ||
|
|
|
|
controller_name == 'label_templates'
|
2018-03-14 21:33:34 +08:00
|
|
|
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?
|
2021-08-20 19:14:24 +08:00
|
|
|
controller_name.in? %(registrations preferences addons teams connected_accounts webhooks)
|
2018-03-14 21:33:34 +08:00
|
|
|
end
|
|
|
|
|
|
|
|
def activities_are_selected?
|
2019-07-03 15:18:41 +08:00
|
|
|
controller_name == 'global_activities'
|
2018-03-14 21:33:34 +08:00
|
|
|
end
|
|
|
|
end
|