| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | module Announcement | 
					
						
							|  |  |  |   OrbitApp.registration "Announcement",:type=> 'ModuleApp' do | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     module_label 'announcement.announcement' | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  |     base_url File.expand_path File.dirname(__FILE__)     | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-02-20 09:25:20 +00:00
										 |  |  |     # personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'announcement.announcement' | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  |      | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     version "0.1" | 
					
						
							|  |  |  |     organization "Rulingcom" | 
					
						
							|  |  |  |     author "RD dep" | 
					
						
							|  |  |  |     intro "I am intro" | 
					
						
							|  |  |  |     update_info 'some update_info' | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     front_end do | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       app_page 'bulletins'  do  | 
					
						
							| 
									
										
										
										
											2013-02-18 07:13:31 +00:00
										 |  |  |         frontend_i18n "announcement.frontend.bulletins" | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     end | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     category ["BulletinCategory"] | 
					
						
							| 
									
										
										
										
											2012-09-13 10:31:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |     widgets do | 
					
						
							|  |  |  |       default_widget do | 
					
						
							|  |  |  |         query 'Bulletin.all' | 
					
						
							|  |  |  |         image :image | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |         field :postdate | 
					
						
							|  |  |  |         link_field :title,{:method => 'panel_announcement_front_end_bulletin_path',:args=>:self} | 
					
						
							|  |  |  |         link_field :bulletin_category_with_title,{:method => 'panel_announcement_front_end_bulletins_path',:args=>{:category_id => [:bulletin_category,:id]}} | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |       end | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |       categories_query 'BulletinCategory.all' | 
					
						
							|  |  |  |       tags_query 'AnnouncementTag.all' | 
					
						
							| 
									
										
										
										
											2012-09-13 10:31:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-01-29 12:33:40 +00:00
										 |  |  |       customize_widget "index" do  | 
					
						
							|  |  |  |         widget_i18n "announcement.widget.index" | 
					
						
							|  |  |  |         style ["1","2"] | 
					
						
							|  |  |  |       end | 
					
						
							| 
									
										
										
										
											2012-11-29 06:21:46 +00:00
										 |  |  |       # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] | 
					
						
							|  |  |  |       # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |      | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |     side_bar do | 
					
						
							| 
									
										
										
										
											2013-02-06 09:44:38 +00:00
										 |  |  |       head_label_i18n  'announcement.announcement',:icon_class=>"icons-megaphone" | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       available_for [:admin,:guest,:manager,:sub_manager] | 
					
						
							|  |  |  |       active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) | 
					
						
							|  |  |  |       active_for_object_auth ['BulletinCategory']  | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       head_link_path "panel_announcement_back_end_bulletins_path" | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       context_link 'announcement.all_articles', | 
					
						
							|  |  |  |                             :link_path=>"panel_announcement_back_end_bulletins_path" , | 
					
						
							| 
									
										
										
										
											2012-12-24 03:55:33 +00:00
										 |  |  |                             :priority=>2, | 
					
						
							| 
									
										
										
										
											2012-12-03 10:52:36 +00:00
										 |  |  |                             :active_for_action=>{:bulletins=>:index}, | 
					
						
							|  |  |  |                             :available_for => [:all] | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       context_link 'announcement.add_new',  | 
					
						
							|  |  |  |                             :link_path=>"new_panel_announcement_back_end_bulletin_path" , | 
					
						
							| 
									
										
										
										
											2012-12-24 03:55:33 +00:00
										 |  |  |                             :priority=>1, | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |                             :active_for_action=>{:bulletins=>:new}, | 
					
						
							| 
									
										
										
										
											2012-12-03 10:52:36 +00:00
										 |  |  |                             :available_for => [:sub_manager] | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |        | 
					
						
							|  |  |  |       context_link 'announcement.categories', | 
					
						
							|  |  |  |                             :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , | 
					
						
							|  |  |  |                             :priority=>3, | 
					
						
							|  |  |  |                             :active_for_action=>{:bulletin_categorys=>:index}, | 
					
						
							|  |  |  |                             :available_for => [:manager] | 
					
						
							| 
									
										
										
										
											2012-09-13 10:31:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-09-24 03:43:48 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       context_link 'announcement.tags', | 
					
						
							|  |  |  |                             :link_path=>"panel_announcement_back_end_tags_path" , | 
					
						
							|  |  |  |                             :priority=>4, | 
					
						
							| 
									
										
										
										
											2012-12-03 10:52:36 +00:00
										 |  |  |                             # :active_for_action=>{:bulletin_categorys=>:index}, | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |                             :available_for => [:manager] | 
					
						
							| 
									
										
										
										
											2012-09-13 10:31:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-12-25 03:01:36 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  |     # widgets do | 
					
						
							|  |  |  |     #   default_widget do | 
					
						
							|  |  |  |     #     query 'Bulletin.all' | 
					
						
							|  |  |  |     #     image :image | 
					
						
							|  |  |  |     #   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   categories_query 'BulletinCategory.all' | 
					
						
							|  |  |  |     #   tags_query 'AnnouncementTag.all' | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   customize_widget "index","announcement.widget.index",:fields=>["title","category","postdate"],:style=>["cu_style_1","cu_style_2","cu_style_3","cu_style_4","cu_style_5"] | 
					
						
							|  |  |  |     #   customize_widget "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" | 
					
						
							|  |  |  |     #   # item "index","announcement.widget.index",:default_template=>true,:fields=>["title","category","postdate"] | 
					
						
							|  |  |  |     #   # item "bulletins_and_web_links","announcement.widget.bulletins_and_web_links" | 
					
						
							|  |  |  |     # end | 
					
						
							|  |  |  |      | 
					
						
							|  |  |  |     # side_bar do | 
					
						
							|  |  |  |     #   head_label_i18n  'admin.announcement',:icon_class=>"icons-megaphone" | 
					
						
							|  |  |  |     #   available_for [:admin,:guest,:manager,:sub_manager] | 
					
						
							|  |  |  |     #   active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']}) | 
					
						
							|  |  |  |     #   active_for_object_auth ['BulletinCategory']  | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   head_link_path "panel_announcement_back_end_bulletins_path" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   context_link 'announcement.all_articles', | 
					
						
							|  |  |  |     #                         :link_path=>"panel_announcement_back_end_bulletins_path" , | 
					
						
							|  |  |  |     #                         :priority=>1, | 
					
						
							|  |  |  |     #                         :active_for_action=>{:bulletins=>:index}, | 
					
						
							|  |  |  |     #                         :available_for => [:all] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   context_link 'announcement.add_new',  | 
					
						
							|  |  |  |     #                         :link_path=>"new_panel_announcement_back_end_bulletin_path" , | 
					
						
							|  |  |  |     #                         :priority=>2, | 
					
						
							|  |  |  |     #                         :active_for_action=>{:bulletins=>:new}, | 
					
						
							|  |  |  |     #                         :available_for => [:sub_manager] | 
					
						
							|  |  |  |        | 
					
						
							|  |  |  |     #   context_link 'announcement.categories', | 
					
						
							|  |  |  |     #                         :link_path=>"panel_announcement_back_end_bulletin_categorys_path" , | 
					
						
							|  |  |  |     #                         :priority=>3, | 
					
						
							|  |  |  |     #                         :active_for_action=>{:bulletin_categorys=>:index}, | 
					
						
							|  |  |  |     #                         :available_for => [:manager] | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     #   context_link 'announcement.tags', | 
					
						
							|  |  |  |     #                         :link_path=>"panel_announcement_back_end_tags_path" , | 
					
						
							|  |  |  |     #                         :priority=>4, | 
					
						
							|  |  |  |     #                         # :active_for_action=>{:bulletin_categorys=>:index}, | 
					
						
							|  |  |  |     #                         :available_for => [:manager] | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       context_link 'announcement.approval_setting', | 
					
						
							|  |  |  |                             :link_path=>"panel_announcement_back_end_approval_setting_path" , | 
					
						
							|  |  |  |                             :priority=>5, | 
					
						
							| 
									
										
										
										
											2012-12-03 10:52:36 +00:00
										 |  |  |                             :active_for_action=>{:approvals=>:setting}, | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |                             :active_for_object_auth => 'BulletinCategory', | 
					
						
							|  |  |  |                             :available_for => [:manager] | 
					
						
							| 
									
										
										
										
											2012-09-13 10:31:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |       context_link 'admin.module.authorization', | 
					
						
							|  |  |  |                             :link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))", | 
					
						
							|  |  |  |                             :priority=>6, | 
					
						
							|  |  |  |                             :active_for_app_auth => 'Announcement', | 
					
						
							| 
									
										
										
										
											2012-12-05 10:35:58 +00:00
										 |  |  |                             :available_for => [:admin] | 
					
						
							| 
									
										
										
										
											2012-11-20 07:56:52 +00:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |