pagecontent/lib/page_content/engine.rb

35 lines
1.2 KiB
Ruby
Raw Permalink Normal View History

2014-05-05 07:05:59 +00:00
module PageContent
class Engine < ::Rails::Engine
initializer "page_content" do
OrbitApp.registration "PageContent", :type => "ModuleApp" do
module_label "page_content.page_content"
base_url File.expand_path File.dirname(__FILE__)
2014-05-14 10:47:17 +00:00
frontend_enabled
2014-05-05 07:05:59 +00:00
authorizable
2014-12-01 10:06:31 +00:00
categorizable
2014-05-05 07:05:59 +00:00
side_bar do
head_label_i18n 'page_content.page', icon_class: "icons-newspaper"
2014-07-31 12:42:42 +00:00
available_for "users"
2016-08-24 13:28:22 +00:00
active_for_controllers (['admin/page_contents', 'admin/wiki_pages'])
2014-05-05 07:05:59 +00:00
head_link_path "admin_page_contents_path"
2014-12-01 10:06:31 +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'
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'
2014-05-05 07:05:59 +00:00
end
end
end
end
end