Orbit/vendor/built_in_modules/gallery/init.rb

81 lines
3.2 KiB
Ruby
Raw Permalink Normal View History

2012-12-05 10:35:58 +00:00
module Gallery
OrbitApp.registration "Gallery",:type=> 'ModuleApp' do
module_label 'gallery.gallery'
2012-12-05 10:35:58 +00:00
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
authorizable
categorizable
taggable
2012-12-05 10:35:58 +00:00
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.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.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 'gallery.gallery',:icon_class=>"icons-pictures"
2012-12-05 10:35:58 +00:00
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 ['GalleryCategory']
2012-12-05 10:35:58 +00:00
head_link_path "panel_gallery_back_end_albums_path"
context_link 'gallery.all',
:link_path=>"panel_gallery_back_end_albums_path" ,
:priority=>3,
:active_for_category => 'Gallery',
:active_for_action=>{:albums=>:index},
:available_for => [:manager]
context_link 'gallery.new',
:link_path=>"new_panel_gallery_back_end_album_path" ,
:priority=>3,
:active_for_category => 'Gallery',
:active_for_action=>{:albums=>:new},
:available_for => [:manager]
2012-12-05 10:35:58 +00:00
context_link 'gallery.categories',
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
2012-12-05 10:35:58 +00:00
:priority=>3,
:active_for_category => 'Gallery',
2012-12-05 10:35:58 +00:00
:available_for => [:manager]
context_link 'tags',
:link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
2012-12-05 10:35:58 +00:00
:priority=>4,
:active_for_tag => 'Gallery',
2012-12-05 10:35:58 +00:00
:available_for => [:manager]
end
end
end