registered-sites/lib/registered_sites/engine.rb

41 lines
1.5 KiB
Ruby

module RegisteredSites
class Engine < ::Rails::Engine
initializer "registered_sites" do
OrbitApp.registration "RegisteredSites", :type => "ModuleApp" do
module_label "registered_sites.registered_sites"
base_url File.expand_path File.dirname(__FILE__)
authorizable
taggable "RegisteredSite"
categorizable
side_bar do
head_label_i18n 'registered_sites.registered_sites', icon_class: "icons-earth"
available_for "users"
active_for_controllers (['admin/registered_sites','admin/customization_logs'])
head_link_path "admin_registered_sites_path"
context_link 'registered_sites.all',
:link_path=>"admin_registered_sites_path" ,
:priority=>1,
:active_for_action=>{'admin/registered_sites'=>"index"},
:available_for => 'users'
context_link 'registered_sites.customization_log',
:link_path=>"admin_customization_logs_path",
:priority=>2,
:active_for_action=>{'admin/customization_logs'=>'index'},
:available_for => 'sub_managers'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'registered_site').id}",
:priority=>3,
:active_for_action=>{'admin/registered_sites'=>'categories'},
:active_for_category => 'RegisteredSite',
:available_for => 'managers'
end
end
end
end
end