From 07815eee8fb09f881e0e4b89e75a9c3374689220 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 10 May 2012 10:27:01 +0800 Subject: [PATCH] fix display for announcement and remove ut field --- config/routes.rb | 3 +++ .../panel/announcement/back_end/bulletins_controller.rb | 2 +- vendor/built_in_modules/announcement/app/models/bulletin.rb | 2 +- .../panel/announcement/back_end/bulletins/_form.html.erb | 4 ++-- .../panel/announcement/front_end/bulletins/show.html.erb | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 50600063..863d17fd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -61,6 +61,9 @@ Orbit::Application.routes.draw do end end resources :module_apps do + match 'manager_auth_proc' => "new_interface_module_apps#setting" ,:as => :manager_auth_proc,:via => :get + match 'manager_auth_proc' => "new_interface_module_apps#update_setting" ,:as => :manager_auth_proc,:via => :post + match 'manager_auth_proc' => "new_interface_module_apps#user_list" ,:as => :manager_auth_show,:via => :put resources :app_auths do member do match 'remove/:type/:target_id' ,:action=> 'remove',:via => "delete",:as =>:remove diff --git a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb index 8700283a..7d89183e 100644 --- a/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb +++ b/vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletins_controller.rb @@ -319,7 +319,7 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController def get_categorys(id = nil) @bulletin_categorys = [] - @unit_list_for_anc = UnitListForAnc.all + #@unit_list_for_anc = UnitListForAnc.all if(is_manager? || is_admin?) @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true)) elsif is_sub_manager? diff --git a/vendor/built_in_modules/announcement/app/models/bulletin.rb b/vendor/built_in_modules/announcement/app/models/bulletin.rb index 008090f4..43f29344 100644 --- a/vendor/built_in_modules/announcement/app/models/bulletin.rb +++ b/vendor/built_in_modules/announcement/app/models/bulletin.rb @@ -33,7 +33,7 @@ class Bulletin mount_uploader :image, ImageUploader belongs_to :bulletin_category - belongs_to :unit_list_for_anc +# belongs_to :unit_list_for_anc # embeds_many :bulletin_links, :cascade_callbacks => true # embeds_many :bulletin_files, :cascade_callbacks => true diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb index 884d6937..94964543 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_form.html.erb @@ -126,8 +126,8 @@
- <%= f.label :unit_list_for_anc%> - <%= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title[I18n.locale], t.id ]}, {}, :class => "input-medium" %> + <%#= f.label :unit_list_for_anc%> + <%#= f.select :unit_list_for_anc_id,@unit_list_for_anc.collect{|t| [ t.title[I18n.locale], t.id ]}, {}, :class => "input-medium" %> <%= f.label :category %> <%= f.select :bulletin_category_id, @bulletin_categorys.collect{|t| [ t.i18n_variable[I18n.locale], t.id ]}, {}, :class => "input-medium" %> diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/show.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/show.html.erb index 8c373ddb..eabacca9 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/show.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/front_end/bulletins/show.html.erb @@ -4,7 +4,7 @@