2016-02-12 23:52:43 +08:00
|
|
|
module ApplicationHelper
|
2016-07-29 21:47:41 +08:00
|
|
|
def module_page?
|
|
|
|
controller_name == 'my_modules'
|
2016-02-12 23:52:43 +08:00
|
|
|
end
|
|
|
|
|
2016-07-29 21:47:41 +08:00
|
|
|
def experiment_page?
|
|
|
|
controller_name == 'experiments'
|
2016-02-12 23:52:43 +08:00
|
|
|
end
|
|
|
|
|
2016-07-29 21:47:41 +08:00
|
|
|
def project_page?
|
|
|
|
controller_name == 'projects' ||
|
|
|
|
(controller_name == 'reports' && action_name == 'index')
|
2016-02-12 23:52:43 +08:00
|
|
|
end
|
2016-12-12 17:30:03 +08:00
|
|
|
|
|
|
|
def sample_types_page_project?
|
|
|
|
controller_name == 'sample_types' && !(defined? @my_module)
|
|
|
|
end
|
|
|
|
|
|
|
|
def sample_groups_page_project?
|
|
|
|
controller_name == 'sample_groups' && !(defined? @my_module)
|
|
|
|
end
|
|
|
|
|
|
|
|
def sample_types_page_my_module?
|
|
|
|
controller_name == 'sample_types' && defined? @my_module
|
|
|
|
end
|
|
|
|
|
|
|
|
def sample_groups_page_my_module?
|
|
|
|
controller_name == 'sample_groups' && defined? @my_module
|
|
|
|
end
|
2016-02-12 23:52:43 +08:00
|
|
|
end
|