2014-05-05 11:33:35 +00:00
|
|
|
module WebResource
|
2014-05-05 08:20:37 +00:00
|
|
|
class Engine < ::Rails::Engine
|
2014-05-05 11:33:35 +00:00
|
|
|
initializer "web_resource" do
|
|
|
|
OrbitApp.registration "WebResource", :type => "ModuleApp" do
|
2015-01-06 05:46:22 +00:00
|
|
|
module_label "web_resource.web_resource"
|
2014-05-05 08:20:37 +00:00
|
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
|
|
|
|
|
|
taggable "WebLink"
|
2014-05-26 03:05:29 +00:00
|
|
|
widget_methods ["widget"]
|
2014-11-25 08:51:33 +00:00
|
|
|
widget_settings [{"data_count"=>30}]
|
2015-03-30 07:08:10 +00:00
|
|
|
models_to_cache [:web_link]
|
2014-05-05 08:20:37 +00:00
|
|
|
categorizable
|
|
|
|
authorizable
|
2014-05-13 12:46:54 +00:00
|
|
|
frontend_enabled
|
2015-05-05 07:45:58 +00:00
|
|
|
data_count 1..30
|
2014-05-05 08:20:37 +00:00
|
|
|
side_bar do
|
2014-05-13 07:05:51 +00:00
|
|
|
head_label_i18n 'web_resource',:icon_class=>"icons-link"
|
2014-07-31 12:43:16 +00:00
|
|
|
available_for "users"
|
2014-05-26 10:08:40 +00:00
|
|
|
active_for_controllers (['admin/web_resources'])
|
2014-05-05 11:33:35 +00:00
|
|
|
head_link_path "admin_web_resources_path"
|
|
|
|
|
|
|
|
context_link 'list_',
|
|
|
|
:link_path=>"admin_web_resources_path" ,
|
|
|
|
:priority=>1,
|
|
|
|
:active_for_action=>{'admin/web_resources'=>'index'},
|
2014-07-31 12:43:16 +00:00
|
|
|
:available_for => 'users'
|
2014-05-13 07:05:51 +00:00
|
|
|
context_link 'new_',
|
2014-05-05 11:33:35 +00:00
|
|
|
:link_path=>"new_admin_web_resource_path" ,
|
|
|
|
:priority=>2,
|
|
|
|
:active_for_action=>{'admin/web_resources'=>'new'},
|
2014-07-31 12:43:16 +00:00
|
|
|
:available_for => 'sub_managers'
|
2014-05-13 07:05:51 +00:00
|
|
|
|
2015-05-05 08:59:29 +00:00
|
|
|
context_link 'web_link.order',
|
|
|
|
:link_path=>"admin_web_resources_order_path" ,
|
|
|
|
:priority=>2,
|
|
|
|
:active_for_action=>{'admin/web_resources'=>'order'},
|
|
|
|
:available_for => 'managers'
|
|
|
|
|
2014-05-13 07:05:51 +00:00
|
|
|
context_link 'categories',
|
|
|
|
:link_path=>"admin_module_app_categories_path" ,
|
2014-05-14 07:40:19 +00:00
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
2014-05-13 07:05:51 +00:00
|
|
|
:priority=>3,
|
|
|
|
:active_for_action=>{'admin/web_resources.'=>'categories'},
|
|
|
|
:active_for_category => 'WebResource',
|
2014-07-31 12:43:16 +00:00
|
|
|
:available_for => 'managers'
|
2014-10-20 11:04:26 +00:00
|
|
|
|
2014-05-13 07:05:51 +00:00
|
|
|
context_link 'tags',
|
|
|
|
:link_path=>"admin_module_app_tags_path" ,
|
2014-05-14 07:40:19 +00:00
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'web_resource').id}",
|
2014-05-13 07:05:51 +00:00
|
|
|
:priority=>4,
|
|
|
|
:active_for_action=>{'admin/web_resources'=>'tags'},
|
|
|
|
:active_for_tag => 'WebResource',
|
2014-07-31 12:43:16 +00:00
|
|
|
:available_for => 'managers'
|
2014-05-05 11:33:35 +00:00
|
|
|
end
|
2014-05-05 08:20:37 +00:00
|
|
|
end
|
2014-05-05 11:33:35 +00:00
|
|
|
end
|
2014-05-05 08:20:37 +00:00
|
|
|
end
|
|
|
|
end
|