registered-sites/lib/registered_sites/engine.rb

35 lines
1.3 KiB
Ruby
Raw Normal View History

2014-10-27 11:01:37 +00:00
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
2014-10-27 11:01:37 +00:00
side_bar do
head_label_i18n 'registered_sites.registered_sites', icon_class: "icons-earth"
available_for "admin"
active_for_controllers (['admin/ad_banners','admin/ad_images'])
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 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'registered_site').id}",
:priority=>2,
:active_for_action=>{'admin/registered_sites'=>'categories'},
:active_for_category => 'RegisteredSite',
:available_for => 'managers'
2014-10-27 11:01:37 +00:00
end
end
end
end
end