orbit-basic/vendor/built_in_modules/gallery/init.rb

60 lines
2.1 KiB
Ruby

module Gallery
OrbitApp.registration "Gallery",:type=> 'ModuleApp' do
module_label 'miss_module_i18n.gallery'
base_url File.expand_path File.dirname(__FILE__)
# personal_plugin :enable => true,:path=>"panel/gallery/plugin/profile",:i18n=>'admin.gallery'
version "0.1"
organization "Rulingcom"
author "Visual dep"
intro "A simple and amazing gallery"
update_info 'some update_info'
front_end do
app_page 'albums'
end
category ["gallery_categories"]
widgets do
# default_widget do
# query 'Bulletin.all'
# image :image
# end
categories_query 'GalleryCategory.all'
# tags_query 'GalleryTag.all'
customize_widget "albums","gallery.widget.albums",:fields=>[],:style=>[]
end
side_bar do
head_label_i18n 'miss_module_i18n.gallery',:icon_class=>"icons-pictures"
available_for [:admin,:guest,:manager,:sub_manager]
active_for_controllers ({:private=>['albums','album_images','gallery_categories','/panel/gallery/back_end/tags']})
active_for_object_auth ['BulletinCategory']
head_link_path "panel_gallery_back_end_albums_path"
context_link 'gallery.categories',
:link_path=>"panel_gallery_back_end_gallery_categories_path" ,
:priority=>3,
:active_for_action=>{:gallery_categories=>:index},
:available_for => [:manager]
context_link 'tags',
:link_path=>"panel_gallery_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: 'gallery'}))",
:priority=>6,
:active_for_app_auth => 'gallery',
:available_for => [:admin]
end
end
end