From a58a3c06557a1c1253f852ef60f8dce11510fa61 Mon Sep 17 00:00:00 2001 From: huang Date: Fri, 18 Nov 2016 19:00:44 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E6=88=90=E5=91=98=E6=96=B0?= =?UTF-8?q?=E5=BC=B9=E6=A1=86ajax=E5=B1=80=E9=83=A8=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/projects_controller.rb | 2 +- app/views/projects/_delete_member_pop.html.erb | 5 +---- app/views/projects/settings/_new_members.html.erb | 2 +- config/routes.rb | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index a0bf28ac1..2bdaddb25 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -769,7 +769,7 @@ class ProjectsController < ApplicationController end end - #配置成员弹框 + # 配置成员弹框 def delete_member_pop @member = Member.find(params[:member].to_i) respond_to do |format| diff --git a/app/views/projects/_delete_member_pop.html.erb b/app/views/projects/_delete_member_pop.html.erb index be9e03292..a72a080c1 100644 --- a/app/views/projects/_delete_member_pop.html.erb +++ b/app/views/projects/_delete_member_pop.html.erb @@ -7,14 +7,11 @@
diff --git a/app/views/projects/settings/_new_members.html.erb b/app/views/projects/settings/_new_members.html.erb index a4e089ca2..bc54f9095 100644 --- a/app/views/projects/settings/_new_members.html.erb +++ b/app/views/projects/settings/_new_members.html.erb @@ -107,7 +107,7 @@ :class => "sy_btn_grey mr5", :data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_for_project_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %> <% if member.deletable? %> - <%= link_to "删除", { :controller => 'projects', :action => 'delete_member_pop', :member => member }, :remote => true, :class => "sy_btn_grey mr5"%> + <%= link_to "删除", delete_member_pop_project_path(@project, :member => member), :remote => true, :class => "sy_btn_grey mr5"%> <% end %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index 8f4f7986f..3848c4b46 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -800,7 +800,7 @@ RedmineApp::Application.routes.draw do post 'close' post 'reopen' get 'forked_pop' - get 'delete_member_pop' + get 'delete_member_pop', :to => 'projects#delete_member_pop', :via => :get, :as => "delete_member_pop" get 'search_public_orgs_not_in_project' match 'copy', :via => [:get, :post] match 'set_public_or_private', :via => [:post]