Prepare to support ruby 3.3.
This commit is contained in:
parent
55c8d3d3da
commit
681bbbec87
|
@ -1,56 +1,58 @@
|
||||||
module WebResource
|
module WebResource
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "web_resource" do
|
initializer "web_resource" do
|
||||||
OrbitApp.registration "WebResource", :type => "ModuleApp" do
|
Rails.application.config.to_prepare do
|
||||||
module_label "web_resource.web_resource"
|
OrbitApp.registration "WebResource", :type => "ModuleApp" do
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
module_label "web_resource.web_resource"
|
||||||
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
|
|
||||||
taggable "WebLink"
|
taggable "WebLink"
|
||||||
widget_methods ["widget"]
|
widget_methods ["widget"]
|
||||||
widget_settings [{"data_count"=>30}]
|
widget_settings [{"data_count"=>30}]
|
||||||
models_to_cache [:web_link]
|
models_to_cache [:web_link]
|
||||||
categorizable
|
categorizable
|
||||||
authorizable
|
authorizable
|
||||||
frontend_enabled
|
frontend_enabled
|
||||||
data_count 1..30
|
data_count 1..30
|
||||||
side_bar do
|
side_bar do
|
||||||
head_label_i18n 'web_resource',:icon_class=>"icons-link"
|
head_label_i18n 'web_resource',:icon_class=>"icons-link"
|
||||||
available_for "users"
|
available_for "users"
|
||||||
active_for_controllers (['admin/web_resources'])
|
active_for_controllers (['admin/web_resources'])
|
||||||
head_link_path "admin_web_resources_path"
|
head_link_path "admin_web_resources_path"
|
||||||
|
|
||||||
context_link 'list_',
|
context_link 'list_',
|
||||||
:link_path=>"admin_web_resources_path" ,
|
:link_path=>"admin_web_resources_path" ,
|
||||||
:priority=>1,
|
:priority=>1,
|
||||||
:active_for_action=>{'admin/web_resources'=>'index'},
|
:active_for_action=>{'admin/web_resources'=>'index'},
|
||||||
:available_for => 'users'
|
:available_for => 'users'
|
||||||
context_link 'new_',
|
context_link 'new_',
|
||||||
:link_path=>"new_admin_web_resource_path" ,
|
:link_path=>"new_admin_web_resource_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/web_resources'=>'new'},
|
:active_for_action=>{'admin/web_resources'=>'new'},
|
||||||
:available_for => 'sub_managers'
|
:available_for => 'sub_managers'
|
||||||
|
|
||||||
context_link 'web_link.order',
|
context_link 'web_link.order',
|
||||||
:link_path=>"admin_web_resources_order_path" ,
|
:link_path=>"admin_web_resources_order_path" ,
|
||||||
:priority=>2,
|
:priority=>2,
|
||||||
:active_for_action=>{'admin/web_resources'=>'order'},
|
:active_for_action=>{'admin/web_resources'=>'order'},
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
|
||||||
context_link 'categories',
|
context_link 'categories',
|
||||||
:link_path=>"admin_module_app_categories_path" ,
|
:link_path=>"admin_module_app_categories_path" ,
|
||||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
||||||
:priority=>3,
|
:priority=>3,
|
||||||
:active_for_action=>{'admin/web_resources.'=>'categories'},
|
:active_for_action=>{'admin/web_resources.'=>'categories'},
|
||||||
:active_for_category => 'WebResource',
|
:active_for_category => 'WebResource',
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
|
||||||
context_link 'tags',
|
context_link 'tags',
|
||||||
:link_path=>"admin_module_app_tags_path" ,
|
:link_path=>"admin_module_app_tags_path" ,
|
||||||
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
||||||
:priority=>4,
|
:priority=>4,
|
||||||
:active_for_action=>{'admin/web_resources'=>'tags'},
|
:active_for_action=>{'admin/web_resources'=>'tags'},
|
||||||
:active_for_tag => 'WebResource',
|
:active_for_tag => 'WebResource',
|
||||||
:available_for => 'managers'
|
:available_for => 'managers'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue