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/gallery/init.rb

71 lines
2.9 KiB
Ruby
Raw Normal View History

2012-12-05 10:35:58 +00:00
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' do
frontend_i18n "gallery.front_end.albums"
end
2012-12-05 10:35:58 +00:00
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=>[],:options=>{"widget1"=>{"vertical"=>[1, 2], "horizontal"=>[1, 2, 3, 4, 5, 6], "album_id"=>{"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}}}
#* customize_widget_options_fields_i18n({"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.widget_option.album"}} )
customize_widget "widget1" do
widget_i18n "gallery.widget.widget1"
style []
options "vertical",:i18n => "gallery.widget_option.vertical",:options_item=>[1, 2]
options "horizontal",:i18n => "gallery.widget_option.horizontal",:options_item=>[1, 2,3,4,5,6]
options "album_id",:i18n =>"gallery.widget_option.album",:options_item => {"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name}
end
2012-12-05 10:35:58 +00:00
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',
2012-12-07 04:40:47 +00:00
:link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Gallery'}))",
2012-12-05 10:35:58 +00:00
:priority=>6,
:active_for_app_auth => 'gallery',
:available_for => [:admin]
end
end
end