announcement-test/lib/announcement/engine.rb

43 lines
1.9 KiB
Ruby
Raw Normal View History

2014-04-01 07:12:43 +00:00
module Announcement
class Engine < ::Rails::Engine
2014-04-18 11:37:31 +00:00
initializer "announcement" do
OrbitApp.registration "Announcement", :type => "ModuleApp" do
module_label "announcement.announcement"
base_url File.expand_path File.dirname(__FILE__)
widget_methods ["widget"]
taggable "Bulletin"
2014-04-20 12:23:52 +00:00
categorizable
authorizable
2014-04-18 11:37:31 +00:00
side_bar do
head_label_i18n 'announcement.announcement', icon_class: "icons-megaphone"
available_for [:admin,:manager,:sub_manager]
2014-04-10 03:52:59 +00:00
active_for_controllers ({:private=>['announcements']})
2014-04-18 11:37:31 +00:00
head_link_path "admin_announcements_path"
2014-05-01 08:41:00 +00:00
context_link 'announcement.all_articles',
:link_path=>"admin_announcements_path" ,
:priority=>1,
:active_for_action=>{'admin/announcement'=>'index'},
2014-05-01 08:41:00 +00:00
:available_for => [:all]
context_link 'announcement.add_new',
:link_path=>"new_admin_announcement_path" ,
:priority=>2,
:active_for_action=>{'admin/announcement'=>'new'},
2014-05-01 08:41:00 +00:00
:available_for => [:sub_manager]
# context_link 'announcement.categories',
# :link_path=>"admin_announcement_path(get_module_app)" ,
# :priority=>3,
# :active_for_category => 'Announcement',
# :available_for => [:manager]
# context_link 'tags',
# :link_path=>"admin_announcement_path(module_app_id: get_module_app)" ,
# :priority=>4,
# :active_for_tag => 'Announcement',
# :available_for => [:manager]
2014-04-18 11:37:31 +00:00
end
2014-05-01 08:41:00 +00:00
2014-04-18 11:37:31 +00:00
end
end
2014-04-01 07:12:43 +00:00
end
end