Orbit/vendor/built_in_modules/survey/init.rb

55 lines
1.7 KiB
Ruby

module Faq
OrbitApp.registration "Survey",:type=> 'ModuleApp' do
module_label 'survey.survey'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/faq/plugin/profile",:i18n=>'admin.faq'
version "0.1"
organization "Rulingcom"
author "RD dep"
intro "I am intro"
update_info 'some update_info'
front_end do
app_page 'survey' do
frontend_i18n "survey.frontend.survey"
end
end
data_count 1..20
widgets do
default_widget do
enable ["typeA"]
query 'Survey.any_of( {:postdate.lte => Time.now} )'
link_field :title, {:method => 'panel_survey_front_end_survey_path',:args=>:self}
field :time_range
field :write
field :result
link_to_more 'panel_survey_front_end_survey_path', :title_i18n=> 'faq.default_widget.to_more'
end
end
side_bar do
head_label_i18n 'survey.survey',:icon_class=>"icons-pie"
available_for [:admin,:manager,:sub_manager]
active_for_controllers ({:private=>['surveys', 'surveys_answers']})
head_link_path "panel_survey_back_end_surveys_path"
context_link 'list_',
:link_path=>"panel_survey_back_end_surveys_path" ,
:priority=>1,
:active_for_action=>{:surveys=>:index},
:available_for => [:all]
context_link 'add',
:link_path=>"new_panel_survey_back_end_survey_path" ,
:priority=>2,
:active_for_action=>{:surveys=>:new},
:available_for => [:sub_manager]
end
end
end