mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 07:26:15 +08:00
Feed the Hound
This commit is contained in:
parent
4d57479cf9
commit
ecf5b5a2c1
|
@ -310,9 +310,7 @@ class MyModulesController < ApplicationController
|
||||||
@my_module = MyModule.find_by_id(params[:id])
|
@my_module = MyModule.find_by_id(params[:id])
|
||||||
if @my_module
|
if @my_module
|
||||||
@experiment = @my_module.experiment
|
@experiment = @my_module.experiment
|
||||||
if @experiment
|
@project = @my_module.experiment.project if @experiment
|
||||||
@project = @my_module.experiment.project
|
|
||||||
end
|
|
||||||
else
|
else
|
||||||
render_404
|
render_404
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,54 +1,54 @@
|
||||||
module SecondaryNavigationHelper
|
module SecondaryNavigationHelper
|
||||||
|
|
||||||
def is_project_info?
|
def is_project_info?
|
||||||
action_name == "show"
|
action_name == 'show'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_project_show?
|
def is_project_show?
|
||||||
action_name == "show"
|
action_name == 'show'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_project_samples?
|
def is_project_samples?
|
||||||
action_name == "samples"
|
action_name == 'samples'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_project_reports?
|
def is_project_reports?
|
||||||
controller_name == "reports" and action_name == "index"
|
controller_name == 'reports' and action_name == 'index'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_project_archive?
|
def is_project_archive?
|
||||||
action_name == "experiment_archive"
|
action_name == 'experiment_archive'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_experiment_canvas?
|
def is_experiment_canvas?
|
||||||
action_name == "canvas"
|
action_name == 'canvas'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_experiment_archive?
|
def is_experiment_archive?
|
||||||
action_name == "module_archive"
|
action_name == 'module_archive'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_info?
|
def is_module_info?
|
||||||
action_name == "show"
|
action_name == 'show'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_protocols?
|
def is_module_protocols?
|
||||||
action_name == "protocols"
|
action_name == 'protocols'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_results?
|
def is_module_results?
|
||||||
action_name == "results"
|
action_name == 'results'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_activities?
|
def is_module_activities?
|
||||||
action_name == "activities"
|
action_name == 'activities'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_samples?
|
def is_module_samples?
|
||||||
action_name == "samples"
|
action_name == 'samples'
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_module_archive?
|
def is_module_archive?
|
||||||
action_name == "archive"
|
action_name == 'archive'
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ module SidebarHelper
|
||||||
|
|
||||||
def experiment_action_to_link_to(experiment)
|
def experiment_action_to_link_to(experiment)
|
||||||
# TODO
|
# TODO
|
||||||
return canvas_experiment_path(experiment)
|
canvas_experiment_path(experiment)
|
||||||
end
|
end
|
||||||
|
|
||||||
def module_action_to_link_to(my_module)
|
def module_action_to_link_to(my_module)
|
||||||
|
|
|
@ -105,7 +105,7 @@ class Project < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def active_experiments
|
def active_experiments
|
||||||
self.experiments.is_archived(false)
|
experiments.is_archived(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
def project_my_modules
|
def project_my_modules
|
||||||
|
|
Loading…
Reference in a new issue