gallery/lib/gallery/engine.rb

52 lines
2.0 KiB
Ruby
Raw Normal View History

2014-05-01 06:33:52 +00:00
module Gallery
class Engine < ::Rails::Engine
2014-05-01 07:06:48 +00:00
initializer "gallery" do
OrbitApp.registration "Gallery", :type => "ModuleApp" do
module_label "gallery.gallery"
base_url File.expand_path File.dirname(__FILE__)
2014-05-23 06:04:26 +00:00
widget_methods ["widget"]
2015-02-06 09:04:39 +00:00
# widget_settings []
widget_settings [{"data_count"=>10}]
2014-05-01 07:06:48 +00:00
categorizable
authorizable
2014-05-23 06:04:26 +00:00
frontend_enabled
2014-06-18 11:33:57 +00:00
data_count 1..10
2014-05-01 07:06:48 +00:00
side_bar do
head_label_i18n 'gallery.gallery', icon_class: "icons-pictures"
2014-07-31 09:12:57 +00:00
available_for "users"
active_for_controllers (['admin/galleries','admin/images'])
2014-05-01 07:06:48 +00:00
head_link_path "admin_galleries_path"
context_link 'gallery.all',
:link_path=>"admin_galleries_path" ,
:priority=>1,
2014-07-31 09:12:57 +00:00
:active_for_action=>{'admin/galleries'=>"index"},
:available_for => 'users'
context_link 'gallery.new',
:link_path=>"new_admin_gallery_path" ,
:priority=>2,
2014-07-31 09:12:57 +00:00
:active_for_action=>{'admin/galleries'=>"new"},
:available_for => 'sub_managers'
2014-05-13 07:40:35 +00:00
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
2014-05-14 07:43:19 +00:00
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}",
2014-05-13 07:40:35 +00:00
:priority=>3,
:active_for_action=>{'admin/galleries'=>'categories'},
2014-07-31 09:12:57 +00:00
:active_for_category => 'Gallery',
:available_for => 'managers'
2014-05-13 07:40:35 +00:00
context_link 'tags',
:link_path=>"admin_module_app_tags_path" ,
2014-05-14 07:43:19 +00:00
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}",
2014-05-13 07:40:35 +00:00
:priority=>4,
:active_for_action=>{'admin/galleries'=>'tags'},
2014-07-31 09:12:57 +00:00
:active_for_tag => 'Gallery',
:available_for => 'managers'
2014-05-01 07:06:48 +00:00
end
end
end
2014-05-01 06:33:52 +00:00
end
end