This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/vendor/built_in_modules/faq/init.rb

79 lines
2.6 KiB
Ruby
Raw Normal View History

2013-03-28 04:06:10 +00:00
module Faq
OrbitApp.registration "Faq",:type=> 'ModuleApp' do
module_label 'faq.faq'
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 'qas' do
frontend_i18n "faq.frontend.faq"
end
end
category ["QaCategory"]
data_count 1..20
2013-05-24 10:42:01 +00:00
taggable
categorizable
2013-08-22 09:56:13 +00:00
authorizable
2013-05-24 10:42:01 +00:00
2013-03-28 04:06:10 +00:00
widgets do
default_widget do
query 'Qa.all'
# enable ['typeA']
2013-03-28 04:06:10 +00:00
link_field :qa_category_with_title,{:method => 'panel_faq_front_end_qas_path',:args=>{:category_id => [:qa_category,:id]}}
link_field :title, {:method => 'panel_faq_front_end_qa_path',:args=>:self}
2013-03-28 04:06:10 +00:00
link_to_more 'panel_faq_front_end_qas_path',:title_i18n=> 'faq.default_widget.to_more'
end
categories_query 'QaCategory.all'
tags_query 'FaqTag.all'
# customize_widget "index" do
# widget_i18n "faq.widget.index"
# style ["1"]
# end
end
2013-03-28 04:06:10 +00:00
side_bar do
head_label_i18n 'faq.faq',:icon_class=>"icons-help"
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['qas', 'qa_categorys']})
active_for_object_auth ['QaCategory']
head_link_path "panel_faq_back_end_qas_path"
context_link 'list_',
:link_path=>"panel_faq_back_end_qas_path" ,
:priority=>1,
:active_for_action=>{:qas=>:index},
:available_for => [:all]
context_link 'add',
:link_path=>"new_panel_faq_back_end_qa_path" ,
:priority=>2,
:active_for_action=>{:qas=>:new},
:available_for => [:sub_manager]
context_link 'categories',
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
2013-03-28 04:06:10 +00:00
:priority=>3,
:active_for_category => 'Qa',
2013-03-28 04:06:10 +00:00
:available_for => [:manager]
context_link 'tags',
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Faq'}))" ,
2013-03-28 04:06:10 +00:00
:priority=>4,
:active_for_tag => 'Faq',
2013-03-28 04:06:10 +00:00
:available_for => [:manager]
end
end
end