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__)
|
2014-08-12 03:40:06 +00:00
|
|
|
widget_methods ["widget","widget1"]
|
2014-05-23 05:56:28 +00:00
|
|
|
widget_settings [{"data_count"=>10}]
|
2014-04-18 11:37:31 +00:00
|
|
|
taggable "Bulletin"
|
2014-04-20 12:23:52 +00:00
|
|
|
categorizable
|
2014-05-02 04:09:44 +00:00
|
|
|
authorizable
|
2014-05-13 10:39:35 +00:00
|
|
|
frontend_enabled
|
|
|
|
data_count 1..10
|
2014-04-07 09:32:44 +00:00
|
|
|
|
2014-04-18 11:37:31 +00:00
|
|
|
side_bar do
|
|
|
|
head_label_i18n 'announcement.announcement', icon_class: "icons-megaphone"
|
2014-07-31 09:12:13 +00:00
|
|
|
available_for "users"
|
2014-05-12 08:16:46 +00:00
|
|
|
active_for_controllers (['admin/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,
|
2014-05-12 08:16:46 +00:00
|
|
|
:active_for_action=>{'admin/announcements'=>'index'},
|
2014-07-31 09:12:13 +00:00
|
|
|
:available_for => 'users'
|
2014-05-13 07:06:23 +00:00
|
|
|
context_link 'new_',
|
2014-05-01 08:41:00 +00:00
|
|
|
:link_path=>"new_admin_announcement_path" ,
|
|
|
|
:priority=>2,
|
2014-05-12 08:16:46 +00:00
|
|
|
:active_for_action=>{'admin/announcements'=>'new'},
|
2014-07-31 09:12:13 +00:00
|
|
|
:available_for => 'sub_managers'
|
2014-05-13 07:06:23 +00:00
|
|
|
context_link 'categories',
|
2014-05-12 08:16:46 +00:00
|
|
|
:link_path=>"admin_module_app_categories_path" ,
|
2014-05-14 07:39:40 +00:00
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'announcement').id}",
|
2014-05-12 08:16:46 +00:00
|
|
|
:priority=>3,
|
|
|
|
:active_for_action=>{'admin/announcements'=>'categories'},
|
|
|
|
:active_for_category => 'Announcement',
|
2014-07-31 09:12:13 +00:00
|
|
|
:available_for => 'managers'
|
2014-05-12 08:16:46 +00:00
|
|
|
context_link 'tags',
|
|
|
|
:link_path=>"admin_module_app_tags_path" ,
|
2014-05-14 07:39:40 +00:00
|
|
|
:link_arg=>"{:module_app_id=>ModuleApp.find_by(:key=>'announcement').id}",
|
2014-05-12 08:16:46 +00:00
|
|
|
:priority=>4,
|
|
|
|
:active_for_action=>{'admin/announcements'=>'tags'},
|
|
|
|
:active_for_tag => 'Announcement',
|
2014-07-31 09:12:13 +00:00
|
|
|
:available_for => 'managers'
|
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
|