Orbit/vendor/built_in_modules/web_resource/init.rb

68 lines
2.5 KiB
Ruby

module WebResource
OrbitApp.registration "WebResource",:type=> 'ModuleApp' do
module_label 'link'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/web_resource/plugin/profile",:i18n=>'admin.web_resource'
version "0.1"
organization "Rulingcom"
author "RD dep"
intro "I am intro"
update_info 'some update_info'
category ["WebLinkCategory"]
widgets do
# default_widget do
# query 'Bulletin.all'
# image :image
# end
categories_query 'BulletinCategory.all'
tags_query 'WebResourceTag.all'
customize_widget "home_list","web_resource.widget.home_list"
end
side_bar do
head_label_i18n 'link',:icon_class=>"icons-link"
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['web_links', 'web_link_categorys']})
active_for_object_auth ['WebLinkCategory']
head_link_path "panel_web_resource_back_end_web_links_path"
context_link 'list_',
:link_path=>"panel_web_resource_back_end_web_links_path" ,
:priority=>1,
:active_for_action=>{:bulletins=>:index},
:available_for => [:all]
context_link 'link',
:link_path=>"new_panel_web_resource_back_end_web_link_path" ,
:priority=>2,
:active_for_action=>{:bulletins=>:new},
:available_for => [:sub_manager]
context_link 'categories',
:link_path=>"panel_web_resource_back_end_web_link_categorys_path" ,
:priority=>3,
:active_for_action=>{:bulletin_categorys=>:index},
:available_for => [:manager]
context_link 'tags',
:link_path=>"panel_web_resource_back_end_tags_path" ,
:priority=>4,
# :active_for_action=>{:bulletin_categorys=>:index},
:available_for => [:manager]
context_link 'module_authorization',
:link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {key: 'web_resource'}))",
:priority=>6,
:active_for_app_auth => 'web_resource',
:available_for => [:admin]
end
end
end