Prepare to support ruby 3.3.

This commit is contained in:
邱博亞 2024-02-24 21:02:37 +08:00
parent 2ebdf132f1
commit 939619c090
1 changed files with 26 additions and 24 deletions

View File

@ -1,33 +1,35 @@
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__)
frontend_enabled
authorizable
categorizable
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
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"
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"
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 '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'
end
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
end
end
end