From 729b28ae43105ded77ad4975198739835744d18f Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 14 Apr 2015 16:03:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE=E5=88=9B?= =?UTF-8?q?=E5=A7=8B=E4=BA=BA=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4=E8=87=AA?= =?UTF-8?q?=E5=B7=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/application_helper.rb | 2 ++ app/views/projects/settings/_new_members.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bc222a302..9c6265f02 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1358,6 +1358,8 @@ module ApplicationHelper link_to l(:button_delete), url, options end + + def delete_new_link(url, options={}) options = { :method => :delete, diff --git a/app/views/projects/settings/_new_members.html.erb b/app/views/projects/settings/_new_members.html.erb index 81aaa4186..d8b75775b 100644 --- a/app/views/projects/settings/_new_members.html.erb +++ b/app/views/projects/settings/_new_members.html.erb @@ -42,13 +42,13 @@ <% end %> - <%# unless member.roles.first.to_s == "Manager"%> + <% unless member.user_id == @project.user_id %> 编辑 <%= delete_link membership_path(member), :remote => true, :class => "c_dblue ml30 fl", :data => (!User.current.admin? && member.include?(User.current) ? {:confirm => l(:text_own_membership_delete_confirmation)} : {confirm: l(:label_delete_confirm)}) if member.deletable? %> - <%# end%> + <% end%> <% end%>