official_module/lib/official_module/engine.rb

49 lines
2.0 KiB
Ruby

module OfficialModule
class Engine < ::Rails::Engine
initializer "official_module" do
OrbitApp.registration "OfficialModule", :type => "ModuleApp" do
base_url File.expand_path File.dirname(__FILE__)
taggable "ServerAbilityManager"
categorizable
authorizable
module_label "official_module.official_module"
set_keyword_contstraints ['/store/check_module_permissions',
'/store/register_old_sites_modules',
'/store/check_for_rulingcom',
'/store/desktop/widgets',
'/desktop/widget_download_url',
'/store/form_token']
side_bar do
head_label_i18n 'official_module.official_module', icon_class: "fa fa-puzzle-piece"
available_for "managers"
active_for_controllers (['admin/official_module'])
head_link_path "admin_official_module_index_path"
context_link 'official_module.all',
:link_path=>"admin_official_module_index_path" ,
:priority=>1,
:active_for_action=>{'admin/official_module'=>"index"},
:available_for => 'users'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'official_module').id}",
:priority=>2,
:active_for_action=>{'admin/official_module'=>'categories'},
:active_for_category => 'OfficialModule',
:available_for => 'managers'
context_link 'tags',
:link_path=>"admin_module_app_tags_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'official_module').id}",
:priority=>3,
:active_for_action=>{'admin/official_module'=>'tags'},
:active_for_tag => 'OfficialModule',
:available_for => 'managers'
end
end
end
end
end