pagecontent/lib/page_content/engine.rb

37 lines
1.3 KiB
Ruby
Raw Normal View History

2014-05-05 07:05:59 +00:00
module PageContent
class Engine < ::Rails::Engine
initializer "page_content" do
2024-02-24 13:02:37 +00:00
Rails.application.config.to_prepare do
OrbitApp.registration "PageContent", :type => "ModuleApp" do
module_label "page_content.page_content"
base_url File.expand_path File.dirname(__FILE__)
frontend_enabled
authorizable
categorizable
2014-05-05 07:05:59 +00:00
2024-02-24 13:02:37 +00:00
side_bar do
head_label_i18n 'page_content.page', icon_class: "icons-newspaper"
available_for "users"
active_for_controllers (['admin/page_contents', 'admin/wiki_pages'])
head_link_path "admin_page_contents_path"
2014-12-01 10:06:31 +00:00
2024-02-24 13:02:37 +00:00
context_link 'page_content.all',
:link_path=>"admin_page_contents_path" ,
:priority=>1,
:active_for_action=>{'admin/page_contents'=>"index"},
:available_for => 'users'
2014-12-01 10:06:31 +00:00
2024-02-24 13:02:37 +00:00
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'page_content').id}",
:priority=>3,
:active_for_action=>{'admin/page_contents'=>'categories'},
:active_for_category => 'PageContent',
:available_for => 'managers'
end
end
2014-05-05 07:05:59 +00:00
end
end
end
end