Orbit/vendor/built_in_modules/survey/init.rb

58 lines
1.8 KiB
Ruby
Raw Normal View History

2013-04-29 08:06:45 +00:00
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
2013-10-18 08:13:42 +00:00
sorting 'desc(:postdate)'
2013-04-29 08:06:45 +00:00
enable ["typeA"]
2013-05-24 14:37:40 +00:00
query 'Survey.any_of( {:postdate.lte => Time.now} )'
2013-10-08 04:24:34 +00:00
# link_field :title, {:method => 'panel_survey_front_end_survey_path',:args=>:self}
# field :title
field :topic
2013-04-29 08:06:45 +00:00
field :time_range
2013-05-24 14:37:40 +00:00
field :write
field :result
link_to_more 'panel_survey_front_end_survey_path', :title_i18n=> 'faq.default_widget.to_more'
2013-04-29 08:06:45 +00:00
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