2014-05-01 06:33:52 +00:00
|
|
|
module Gallery
|
|
|
|
class Engine < ::Rails::Engine
|
2020-03-17 09:25:08 +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}]
|
2015-03-30 06:57:01 +00:00
|
|
|
models_to_cache [:album,:album_image]
|
2019-09-30 14:24:14 +00:00
|
|
|
taggable "Album"
|
|
|
|
categorizable
|
|
|
|
authorizable
|
2014-05-23 06:04:26 +00:00
|
|
|
frontend_enabled
|
2015-03-30 08:28:50 +00:00
|
|
|
data_count 1..30
|
2020-03-17 09:25:08 +00:00
|
|
|
side_bar do
|
|
|
|
head_label_i18n 'gallery.gallery', icon_class: "icons-pictures"
|
|
|
|
available_for "users"
|
|
|
|
active_for_controllers (['admin/galleries','admin/images'])
|
|
|
|
head_link_path "admin_galleries_path"
|
2014-05-01 07:06:48 +00:00
|
|
|
|
2020-03-17 09:25:08 +00:00
|
|
|
context_link 'gallery.all',
|
|
|
|
:link_path=>"admin_galleries_path" ,
|
|
|
|
:priority=>1,
|
|
|
|
:active_for_action=>{'admin/galleries'=>"index"},
|
|
|
|
:available_for => 'users'
|
2014-05-05 06:07:18 +00:00
|
|
|
|
2020-03-17 09:25:08 +00:00
|
|
|
context_link 'gallery.new',
|
|
|
|
:link_path=>"new_admin_gallery_path" ,
|
|
|
|
:priority=>2,
|
|
|
|
:active_for_action=>{'admin/galleries'=>"new"},
|
|
|
|
:available_for => 'sub_managers'
|
2014-05-13 07:40:35 +00:00
|
|
|
|
2020-03-17 09:25:08 +00:00
|
|
|
context_link 'categories',
|
|
|
|
:link_path=>"admin_module_app_categories_path" ,
|
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}",
|
|
|
|
:priority=>3,
|
|
|
|
:active_for_action=>{'admin/galleries'=>'categories'},
|
|
|
|
:active_for_category => 'Gallery',
|
|
|
|
:available_for => 'managers'
|
|
|
|
|
|
|
|
context_link 'tags',
|
|
|
|
:link_path=>"admin_module_app_tags_path" ,
|
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'gallery').id}",
|
|
|
|
:priority=>4,
|
|
|
|
:active_for_action=>{'admin/galleries'=>'tags'},
|
|
|
|
:active_for_tag => 'Gallery',
|
|
|
|
:available_for => 'managers'
|
|
|
|
context_link 'setting',
|
|
|
|
:link_path=>"admin_galleries_setting_path" ,
|
|
|
|
:priority=>5,
|
|
|
|
:active_for_action=>{'admin/galleries'=>'setting'},
|
|
|
|
:available_for => 'managers'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2014-05-01 06:33:52 +00:00
|
|
|
end
|
|
|
|
end
|