video_pro/lib/video_pro/engine.rb

53 lines
2.0 KiB
Ruby
Raw Normal View History

2023-02-02 06:42:50 +00:00
module VideoPro
class Engine < ::Rails::Engine
initializer "video_pro" do
OrbitApp.registration "VideoPro", :type => "ModuleApp" do
module_label "video_pro.video_pro"
base_url File.expand_path File.dirname(__FILE__)
widget_methods ["widget"]
widget_settings [{"multiselect"=>false,"display_field"=>"title","enable_custom_widget_data"=>true, "data_count"=>30}]
2023-02-02 06:42:50 +00:00
# models_to_cache [:video_data,:video_image]
taggable "VideoImage"
categorizable
authorizable
frontend_enabled
data_count 1..30
side_bar do
head_label_i18n 'video_pro.video_pro', icon_class: "icons-video"
available_for "sub_managers"
active_for_controllers (['admin/video_pros','admin/video_images'])
head_link_path "admin_video_pros_path"
context_link 'video_pro.all',
:link_path=>"admin_video_pros_path" ,
:priority=>1,
:active_for_action=>{'admin/video_pros'=>"index"},
:available_for => 'sub_managers'
context_link 'setting',
:link_path=>"settings_admin_video_pros_path" ,
:priority=>1,
:active_for_action=>{'admin/video_pros'=>"settings"},
:available_for => 'sub_managers'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'video_pro').id}",
:priority=>3,
:active_for_action=>{'admin/video_pros'=>'categories'},
:active_for_category => 'VideoPro',
:available_for => 'managers'
context_link 'tags',
:link_path=>"admin_module_app_tags_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'video_pro').id}",
:priority=>5,
:active_for_action=>{'admin/video_pros'=>'tags'},
:active_for_tag => 'VideoPro',
:available_for => 'managers'
end
end
end
end
end