Conflicts: app/controllers/admin/page_parts_controller.rb app/controllers/default_widget_controller.rb app/uploaders/gprs_uploader.rb app/uploaders/location_uploader.rb app/views/admin/page_parts/_module_widget.html.erb app/views/admin/page_parts/reload_widget_styles.js.erb app/views/admin/page_parts/reload_widgets.js.erb app/views/layouts/_side_bar_content.html.erb config/locales/zh_tw.yml lib/parsers/parser_front_end.rb vendor/built_in_modules/announcement/init.rb vendor/built_in_modules/gprs/app/assets/javascripts/panel/gprs/back_end/locations.js vendor/built_in_modules/gprs/app/assets/stylesheets/panel/gprs/back_end/locations.css vendor/built_in_modules/gprs/app/controllers/panel/gprs/back_end/locations_controller.rb vendor/built_in_modules/gprs/app/views/panel/gprs/back_end/locations/index.html.erb vendor/built_in_modules/gprs/test/functional/panel/gprs/back_end/locations_controller_test.rb vendor/built_in_modules/location/README.rdoc vendor/built_in_modules/location/app/assets/javascripts/panel/gprs/back_end/locations.js vendor/built_in_modules/location/app/assets/javascripts/panel/location/back_end/locations.js vendor/built_in_modules/location/app/assets/stylesheets/panel/gprs/back_end/locations.css vendor/built_in_modules/location/app/assets/stylesheets/panel/location/back_end/locations.css vendor/built_in_modules/location/app/controllers/panel/location/back_end/locations_controller.rb vendor/built_in_modules/location/app/controllers/panel/locations/back_end/locations_controller.rb vendor/built_in_modules/location/app/models/location.rb vendor/built_in_modules/location/app/uploaders/locations_uploader.rb vendor/built_in_modules/location/app/views/panel/location/back_end/locations/index.html.erb vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/_form.html.erb vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/edit.html.erb vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/index.html.erb vendor/built_in_modules/location/app/views/panel/locations/back_end/locations/new.html.erb vendor/built_in_modules/location/config/routes.rb vendor/built_in_modules/location/lib/location.rb vendor/built_in_modules/location/location.gemspec vendor/built_in_modules/location/test/functional/panel/gprs/back_end/locations_controller_test.rb vendor/built_in_modules/location/test/functional/panel/location/back_end/locations_controller_test.rb
130 lines
5.8 KiB
Ruby
130 lines
5.8 KiB
Ruby
module Announcement
|
|
OrbitApp.registration "Announcement",:type=> 'ModuleApp' do
|
|
module_label 'announcement.announcement'
|
|
base_url File.expand_path File.dirname(__FILE__)
|
|
|
|
personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'announcement.announcement'
|
|
|
|
version "0.1"
|
|
organization "Rulingcom"
|
|
author "RD dep"
|
|
intro "I am intro"
|
|
update_info 'some update_info'
|
|
|
|
front_end do
|
|
app_page 'bulletins'
|
|
end
|
|
|
|
category ["BulletinCategory"]
|
|
|
|
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=>2,
|
|
:active_for_action=>{:bulletins=>:index},
|
|
:available_for => [:all]
|
|
context_link 'announcement.add_new',
|
|
:link_path=>"new_panel_announcement_back_end_bulletin_path" ,
|
|
:priority=>1,
|
|
: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]
|
|
|
|
|
|
# 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]
|
|
|
|
context_link 'announcement.approval_setting',
|
|
:link_path=>"panel_announcement_back_end_approval_setting_path" ,
|
|
:priority=>5,
|
|
:active_for_action=>{:approvals=>:setting},
|
|
:active_for_object_auth => 'BulletinCategory',
|
|
:available_for => [:manager]
|
|
|
|
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',
|
|
:available_for => [:admin]
|
|
end
|
|
end
|
|
end
|