47 lines
1.7 KiB
Ruby
47 lines
1.7 KiB
Ruby
module Gallery
|
|
class Engine < ::Rails::Engine
|
|
initializer "gallery" do
|
|
OrbitApp.registration "Gallery", :type => "ModuleApp" do
|
|
module_label "gallery.gallery"
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
widget_methods ["widget"]
|
|
widget_settings [{"data_count"=>10}]
|
|
categorizable
|
|
authorizable
|
|
frontend_enabled
|
|
|
|
side_bar do
|
|
head_label_i18n 'gallery.gallery', icon_class: "icons-pictures"
|
|
available_for [:admin,:manager,:sub_manager]
|
|
active_for_controllers (['admin/galleries','admin/images'])
|
|
head_link_path "admin_galleries_path"
|
|
|
|
context_link 'gallery.all',
|
|
:link_path=>"admin_galleries_path" ,
|
|
:priority=>1,
|
|
:active_for_action=>{'admin/galleries'=>"index"}
|
|
|
|
context_link 'gallery.new',
|
|
:link_path=>"new_admin_gallery_path" ,
|
|
:priority=>2,
|
|
:active_for_action=>{'admin/galleries'=>"new"}
|
|
|
|
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'
|
|
|
|
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'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|