publication/lib/journals/engine.rb

44 lines
1.5 KiB
Ruby
Raw Normal View History

2018-10-04 02:47:23 +00:00
module Journals
class Engine < ::Rails::Engine
initializer "journals" do
OrbitApp.registration "Journals", :type => "ModuleApp" do
module_label "journals.journal"
base_url File.expand_path File.dirname(__FILE__)
widget_methods ['widget']
widget_settings [{"data_count"=>30}]
# models_to_cache [:my_voting]
# taggable "Landspace"
categorizable
authorizable
frontend_enabled
data_count 1..30
side_bar do
head_label_i18n 'journals.journal', icon_class: "icon-book"
available_for "users"
active_for_controllers (['admin/journals'])
head_link_path "admin_journals_path"
context_link 'all',
:link_path=>"admin_journals_path" ,
:priority=>1,
:active_for_action=>{'admin/journals'=>"index"},
:available_for => 'users'
context_link 'new_',
:link_path=>"new_admin_journal_path" ,
:priority=>2,
:active_for_action=>{'admin/journals'=>"new"},
:available_for => 'sub_managers'
context_link 'categories',
:link_path=>"admin_module_app_categories_path" ,
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'journal').id}",
:priority=>3,
:active_for_action=>{'admin/journals'=>'categories'},
:active_for_category => 'Journals',
:available_for => 'managers'
end
end
end
end
end