2014-05-08 06:03:33 +00:00
|
|
|
module Archive
|
|
|
|
class Engine < ::Rails::Engine
|
|
|
|
initializer "archive" do
|
|
|
|
OrbitApp.registration "Archive", :type => "ModuleApp" do
|
|
|
|
module_label "archive.archive"
|
|
|
|
base_url File.expand_path File.dirname(__FILE__)
|
2014-05-23 06:00:49 +00:00
|
|
|
widget_methods ["widget"]
|
|
|
|
widget_settings [{"data_count"=>10}]
|
2014-05-08 06:03:33 +00:00
|
|
|
taggable "ArchiveFile"
|
|
|
|
categorizable
|
|
|
|
authorizable
|
2014-05-23 06:00:49 +00:00
|
|
|
frontend_enabled
|
2014-05-08 06:03:33 +00:00
|
|
|
side_bar do
|
|
|
|
head_label_i18n 'archive.archive', icon_class: "icons-archive"
|
2014-07-31 12:40:44 +00:00
|
|
|
available_for "users"
|
2014-05-14 11:52:06 +00:00
|
|
|
active_for_controllers (['admin/archive_files'])
|
2014-05-08 06:03:33 +00:00
|
|
|
head_link_path "admin_archive_files_path"
|
|
|
|
|
2014-05-16 08:26:43 +00:00
|
|
|
context_link 'all',
|
2014-05-14 11:52:06 +00:00
|
|
|
:link_path=>"admin_archive_files_path" ,
|
|
|
|
:priority=>1,
|
2014-07-31 12:40:44 +00:00
|
|
|
:active_for_action=>{'admin/archive_files'=>"index"},
|
|
|
|
:available_for => 'users'
|
2014-05-14 11:52:06 +00:00
|
|
|
|
2014-05-16 08:26:43 +00:00
|
|
|
context_link 'new_',
|
2014-05-14 11:52:06 +00:00
|
|
|
:link_path=>"new_admin_archive_file_path" ,
|
|
|
|
:priority=>2,
|
2014-07-31 12:40:44 +00:00
|
|
|
:active_for_action=>{'admin/archive_files'=>"new"},
|
|
|
|
:available_for => 'sub_managers'
|
2014-05-16 08:26:43 +00:00
|
|
|
|
|
|
|
context_link 'categories',
|
|
|
|
:link_path=>"admin_module_app_categories_path" ,
|
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive').id}",
|
|
|
|
:priority=>3,
|
|
|
|
:active_for_action=>{'admin/archive_files'=>'categories'},
|
2014-07-31 12:40:44 +00:00
|
|
|
:active_for_category => 'Archive',
|
|
|
|
:available_for => 'managers'
|
2014-05-16 08:26:43 +00:00
|
|
|
|
|
|
|
context_link 'tags',
|
|
|
|
:link_path=>"admin_module_app_tags_path" ,
|
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'archive').id}",
|
|
|
|
:priority=>4,
|
|
|
|
:active_for_action=>{'admin/archive_files'=>'tags'},
|
2014-07-31 12:40:44 +00:00
|
|
|
:active_for_tag => 'Archive',
|
|
|
|
:available_for => 'managers'
|
2014-05-08 06:03:33 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|