52 lines
1.7 KiB
Ruby
52 lines
1.7 KiB
Ruby
module Video
|
|
class Engine < ::Rails::Engine
|
|
initializer "video" do
|
|
OrbitApp.registration "Video", :type => "ModuleApp" do
|
|
module_label "video.video"
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
widget_methods ["widget"]
|
|
widget_settings [{"data_count"=>10}]
|
|
taggable "VideoChannel"
|
|
categorizable
|
|
authorizable
|
|
frontend_enabled
|
|
data_count 1..10
|
|
side_bar do
|
|
head_label_i18n 'video.video', icon_class: "icons-megaphone"
|
|
available_for "users"
|
|
active_for_controllers (['admin/video_channels'])
|
|
head_link_path "admin_video_channels_path"
|
|
|
|
context_link 'all',
|
|
:link_path=>"admin_video_channels_path" ,
|
|
:priority=>1,
|
|
:active_for_action=>{'admin/video_channels'=>"index"},
|
|
:available_for => 'users'
|
|
|
|
context_link 'new_',
|
|
:link_path=>"new_admin_video_channel_path" ,
|
|
:priority=>2,
|
|
:active_for_action=>{'admin/video_channels'=>"new"},
|
|
:available_for => 'sub_managers'
|
|
|
|
context_link 'categories',
|
|
:link_path=>"admin_module_app_categories_path" ,
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'video').id}",
|
|
:priority=>3,
|
|
:active_for_action=>{'admin/video_channels'=>'categories'},
|
|
:active_for_category => 'Video',
|
|
:available_for => 'managers'
|
|
|
|
context_link 'tags',
|
|
:link_path=>"admin_module_app_tags_path" ,
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'video').id}",
|
|
:priority=>4,
|
|
:active_for_action=>{'admin/video_channels'=>'tags'},
|
|
:active_for_tag => 'Video',
|
|
:available_for => 'managers'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|