56 lines
2.2 KiB
Ruby
56 lines
2.2 KiB
Ruby
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__)
|
|
widget_methods ["widget","group_by_category"]
|
|
widget_settings [{"data_count"=>30}]
|
|
models_to_cache [:archive_file]
|
|
taggable "ArchiveFile"
|
|
categorizable
|
|
authorizable
|
|
frontend_enabled
|
|
side_bar do
|
|
head_label_i18n 'archive.archive', icon_class: "icons-archive"
|
|
available_for "users"
|
|
active_for_controllers (['admin/archive_files'])
|
|
head_link_path "admin_archive_files_path"
|
|
|
|
context_link 'all',
|
|
:link_path=>"admin_archive_files_path" ,
|
|
:priority=>1,
|
|
:active_for_action=>{'admin/archive_files'=>"index"},
|
|
:available_for => 'users'
|
|
context_link 'new_',
|
|
:link_path=>"new_admin_archive_file_path" ,
|
|
:priority=>2,
|
|
:active_for_action=>{'admin/archive_files'=>"new"},
|
|
:available_for => 'sub_managers'
|
|
|
|
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'},
|
|
:active_for_category => 'Archive',
|
|
:available_for => 'managers'
|
|
|
|
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'},
|
|
:active_for_tag => 'Archive',
|
|
:available_for => 'managers'
|
|
context_link 'categories_order',
|
|
:link_path=>"categories-order_admin_archive_file_path" ,
|
|
:priority=>5,
|
|
:active_for_action=>{'admin/archive_files'=>'categories_order'},
|
|
:available_for => 'managers'
|
|
end
|
|
end
|
|
end
|
|
end
|
|
end
|