donate/lib/nkuht_donate/engine.rb

46 lines
2.2 KiB
Ruby

module NkuhtDonate
class Engine < ::Rails::Engine
initializer "nkuht_donate" do
OrbitApp.registration "NkuhtDonate", :type => "ModuleApp" do
module_label "nkuht_donate.nkuht_donate"
base_url File.expand_path File.dirname(__FILE__)
authorizable
frontend_enabled
side_bar do
head_label_i18n 'nkuht_donate.nkuht_donate', icon_class: "icon-credit-card"
available_for "managers"
active_for_controllers (['admin/nkuht_donates'])
head_link_path "admin_nkuht_donates_path"
context_link 'list_',
:link_path=>"admin_nkuht_donates_path" ,
:priority=>1,
:active_for_action=>{'admin/nkuht_donates'=>'index'},
:available_for => 'managers'
context_link 'new_',
:link_path=>"new_admin_nkuht_donate_path" ,
:priority=>2,
:active_for_action=>{'admin/nkuht_donates'=>'new'},
:available_for => 'managers'
context_link 'nkuht_donate.set_nkuht_donate_departments',
:link_path=>"admin_nkuht_donate_departments_path" ,
:priority=>3,
:active_for_action=>{'admin/nkuht_donates'=>'nkuht_donate_departments'},
:available_for => 'managers'
context_link 'nkuht_donate.set_nkuht_donate_units',
:link_path=>"admin_nkuht_donate_units_path" ,
:priority=>3,
:active_for_action=>{'admin/nkuht_donates'=>'nkuht_donate_units'},
:available_for => 'managers'
context_link 'nkuht_donate.set_nkuht_donate_uses',
:link_path=>"admin_nkuht_donate_uses_path" ,
:priority=>3,
:active_for_action=>{'admin/nkuht_donates'=>'nkuht_donate_uses'},
:available_for => 'managers'
end
end
end
end
end