55 lines
2.2 KiB
Ruby
55 lines
2.2 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__)
|
|
widget_methods ["site_count_widget"]
|
|
widget_settings [{"data_count"=>30}]
|
|
authorizable
|
|
taggable "RegisteredSite"
|
|
categorizable
|
|
set_keyword_contstraints ['/git-auth']
|
|
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'
|
|
|
|
context_link 'registered_sites.bundle_update_remote_show',
|
|
:link_path=>"bundle_update_remote_show_admin_registered_sites_path",
|
|
:priority=>4,
|
|
:active_for_action=>{'admin/registered_sites'=>'bundle_update_remote_show'},
|
|
:available_for => 'managers'
|
|
|
|
context_link 'registered_sites.announcement',
|
|
:link_path=>"announcement_admin_registered_sites_path",
|
|
:priority=>5,
|
|
:active_for_action=>{'admin/registered_sites'=>'announcement'},
|
|
:available_for => 'managers'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|