survey/lib/survey/engine.rb

34 lines
1.2 KiB
Ruby

module Survey
class Engine < ::Rails::Engine
initializer "survey" do
OrbitApp.registration "Survey", :type => "ModuleApp" do
module_label "survey.survey"
base_url File.expand_path File.dirname(__FILE__)
widget_methods ["widget","widget1"]
widget_settings [{"data_count"=>10}]
authorizable
frontend_enabled
data_count 1..20
side_bar do
head_label_i18n 'survey.survey', icon_class: "icons-pie"
available_for "users"
active_for_controllers (['admin/surveys'])
head_link_path "admin_surveys_path"
context_link 'list_',
:link_path=>"admin_surveys_path" ,
:priority=>1,
:active_for_action=>{'admin/surveys'=>'index'},
:available_for => 'users'
context_link 'new_',
:link_path=>"new_admin_survey_path" ,
:priority=>2,
:active_for_action=>{'admin/surveys'=>'new'},
:available_for => 'sub_managers'
end
end
end
end
end