| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  | module Gallery | 
					
						
							|  |  |  |   OrbitApp.registration "Gallery",:type=> 'ModuleApp' do | 
					
						
							| 
									
										
										
										
											2013-02-06 09:44:38 +00:00
										 |  |  |     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 | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       app_page 'albums' do | 
					
						
							|  |  |  |         frontend_i18n "gallery.front_end.albums" | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-07-11 10:48:51 +00:00
										 |  |  |     authorizable | 
					
						
							|  |  |  |     categorizable | 
					
						
							| 
									
										
										
										
											2013-07-02 08:46:44 +00:00
										 |  |  |     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' | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       #* 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}}}  | 
					
						
							| 
									
										
										
										
											2013-03-12 10:13:48 +00:00
										 |  |  |       #* customize_widget_options_fields_i18n({"widget1"=>{"vertical"=>"gallery.widget_option.vertical", "horizontal"=>"gallery.widget_option.horizontal", "album_id"=>"gallery.album"}} ) | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       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] | 
					
						
							| 
									
										
										
										
											2013-03-12 10:13:48 +00:00
										 |  |  |         options "album_id",:i18n =>"gallery.album",:options_item => {"query"=>"GalleryAlbum.all", "value"=>:id, "label"=>:name} | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |     end | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     side_bar do | 
					
						
							| 
									
										
										
										
											2013-02-06 09:44:38 +00:00
										 |  |  |       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']}) | 
					
						
							| 
									
										
										
										
											2013-03-04 06:40:29 +00:00
										 |  |  |       active_for_object_auth ['GalleryCategory']  | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       head_link_path "panel_gallery_back_end_albums_path" | 
					
						
							| 
									
										
										
										
											2013-07-11 10:48:51 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |       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
										 |  |  |        | 
					
						
							| 
									
										
										
										
											2013-07-11 10:48:51 +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, | 
					
						
							| 
									
										
										
										
											2013-07-11 10:48:51 +00:00
										 |  |  |                             :active_for_category => 'Gallery', | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |                             :available_for => [:manager] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       context_link 'tags', | 
					
						
							| 
									
										
										
										
											2013-07-11 10:48:51 +00:00
										 |  |  |                             :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" , | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |                             :priority=>4, | 
					
						
							| 
									
										
										
										
											2013-07-02 08:46:44 +00:00
										 |  |  |                             :active_for_tag => 'Gallery', | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |                             :available_for => [:manager] | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |