53 lines
2.0 KiB
Ruby
53 lines
2.0 KiB
Ruby
module Experiment
|
|
class Engine < ::Rails::Engine
|
|
initializer "experiment" do
|
|
OrbitApp.registration "Experiment", :type => "ModuleApp" do
|
|
module_label "experiment.experiment"
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
widget_methods ['widget']
|
|
widget_settings [{"data_count"=>30}]
|
|
# models_to_cache [:experiment]
|
|
taggable "Subject"
|
|
categorizable
|
|
authorizable
|
|
frontend_enabled
|
|
data_count 1..30
|
|
side_bar do
|
|
head_label_i18n 'experiment.experiment', icon_class: "icons-thermometer"
|
|
available_for "users"
|
|
active_for_controllers (['admin/experiments'])
|
|
head_link_path "admin_experiments_path"
|
|
|
|
context_link 'all',
|
|
:link_path=>"admin_experiments_path" ,
|
|
:priority=>1,
|
|
:active_for_action=>{'admin/experiments'=>"index"},
|
|
:available_for => 'users'
|
|
|
|
context_link 'new_',
|
|
:link_path=>"new_admin_experiment_path" ,
|
|
:priority=>2,
|
|
:active_for_action=>{'admin/experiments'=>"new"},
|
|
:available_for => 'sub_managers'
|
|
|
|
context_link 'categories',
|
|
:link_path=>"admin_module_app_categories_path" ,
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'experiment').id}",
|
|
:priority=>3,
|
|
:active_for_action=>{'admin/experiments'=>'categories'},
|
|
:active_for_category => 'experiment',
|
|
:available_for => 'managers'
|
|
|
|
context_link 'tags',
|
|
:link_path=>"admin_module_app_tags_path" ,
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'experiment').id}",
|
|
:priority=>5,
|
|
:active_for_action=>{'admin/experiments'=>'tags'},
|
|
:active_for_tag => 'experiment',
|
|
:available_for => 'managers'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|