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