From 7a6d30ad624c6d519baa3f45bd28c62449e0bf36 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Fri, 11 May 2012 16:46:36 +0800 Subject: [PATCH] Remove unless files and change routes. --- .../new_interface_module_apps_controller.rb | 66 ------------------- .../_modal_list.html.erb | 42 ------------ .../_privilege_user.html.erb | 25 ------- .../setting.html.erb | 56 ---------------- .../new_interface_module_apps/setting.js.erb | 2 - .../update_setting.js.erb | 1 - .../user_list.js.erb | 2 - config/routes.rb | 11 +++- .../bulletin_category_setting_controller.rb | 64 ------------------ .../_privilege_user.html.erb | 25 ------- .../bulletin_category_setting/setting.js.erb | 2 - .../update_setting.js.erb | 1 - .../user_list.js.erb | 2 - .../announcement/config/routes.rb | 6 +- ...ws_bulletin_category_setting_controller.rb | 64 ------------------ .../_privilege_user.html.erb | 25 ------- .../setting.js.erb | 2 - .../update_setting.js.erb | 1 - .../user_list.js.erb | 2 - vendor/built_in_modules/news/config/routes.rb | 6 +- 20 files changed, 10 insertions(+), 395 deletions(-) delete mode 100644 app/controllers/admin/new_interface_module_apps_controller.rb delete mode 100644 app/views/admin/new_interface_module_apps/_modal_list.html.erb delete mode 100644 app/views/admin/new_interface_module_apps/_privilege_user.html.erb delete mode 100644 app/views/admin/new_interface_module_apps/setting.html.erb delete mode 100644 app/views/admin/new_interface_module_apps/setting.js.erb delete mode 100644 app/views/admin/new_interface_module_apps/update_setting.js.erb delete mode 100644 app/views/admin/new_interface_module_apps/user_list.js.erb delete mode 100644 vendor/built_in_modules/announcement/app/controllers/panel/announcement/back_end/bulletin_category_setting_controller.rb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/_privilege_user.html.erb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/setting.js.erb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/update_setting.js.erb delete mode 100644 vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletin_category_setting/user_list.js.erb delete mode 100644 vendor/built_in_modules/news/app/controllers/panel/news/back_end/news_bulletin_category_setting_controller.rb delete mode 100644 vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/_privilege_user.html.erb delete mode 100644 vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/setting.js.erb delete mode 100644 vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/update_setting.js.erb delete mode 100644 vendor/built_in_modules/news/app/views/panel/news/back_end/news_bulletin_category_setting/user_list.js.erb diff --git a/app/controllers/admin/new_interface_module_apps_controller.rb b/app/controllers/admin/new_interface_module_apps_controller.rb deleted file mode 100644 index 8cf77e5e..00000000 --- a/app/controllers/admin/new_interface_module_apps_controller.rb +++ /dev/null @@ -1,66 +0,0 @@ -class Admin::NewInterfaceModuleAppsController < ApplicationController - before_filter :authenticate_user! - before_filter :is_admin? - include AdminHelper - - layout "new_admin" - - def setting - @sys_users = User.all(conditions: {admin: false}) - @module_app = ModuleApp.find(params[:module_app_id]) - @options_from_collection_for_select_bulletin_categorys = [@module_app].collect{|ma| [ma.title,ma.id] } - # if params.has_key? :category - # @bulletin_category = BulletinCategory.find params[:category][:id] - # else - # @bulletin_category = @bulletin_categorys.first - # end - @users_array = @module_app.managing_users rescue [] - - respond_to do |format| - format.html - format.js - end - end - - def update_setting - module_app = update_setting_by_params - if module_app.save! - flash[:notice] = "Update Done" - else - flash[:notice] = "Update Failed" - end - end - - def user_list - @module_app = ModuleApp.find params[:module_app][:id] - end - - protected - def update_setting_by_params - ma = ModuleApp.find params[:module_app][:id] - user_sat = User.find params[:users].keys - users_to_new = user_sat - ma.managing_users - users_to_remove = ma.managing_users - user_sat - - users_to_new.each do |new_user| - ma.assign_manager(new_user,current_user) - end - - users_to_remove.each do |remove_user| - ma.remove_manager(remove_user) - end - ma - end - - def get_categorys(id = nil) - @bulletin_categorys = [] - if(is_manager? || is_admin?) - @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true)) - elsif is_sub_manager? - @bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new') - end - end - - - -end \ No newline at end of file diff --git a/app/views/admin/new_interface_module_apps/_modal_list.html.erb b/app/views/admin/new_interface_module_apps/_modal_list.html.erb deleted file mode 100644 index b5b0ebcd..00000000 --- a/app/views/admin/new_interface_module_apps/_modal_list.html.erb +++ /dev/null @@ -1,42 +0,0 @@ -<% if module_app -%> - -