From f13e006e4d40ea3445426e4c69580c811d7e50b7 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 10 May 2012 10:27:01 +0800 Subject: [PATCH 1/4] 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 @@
From 99c4e947294c014d57c53a645dbf4e56e6f319d5 Mon Sep 17 00:00:00 2001 From: Christophe Vilayphiou Date: Thu, 10 May 2012 10:28:29 +0800 Subject: [PATCH 2/4] Fix for home_list widget --- .../web_resource/widget/web_links/home_list.html.erb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/home_list.html.erb b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/home_list.html.erb index e5f2abd2..5be53041 100644 --- a/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/home_list.html.erb +++ b/vendor/built_in_modules/web_resource/app/views/panel/web_resource/widget/web_links/home_list.html.erb @@ -1,5 +1,7 @@ - +