修改项目创始人不能删除自己

This commit is contained in:
huang 2015-04-14 16:03:47 +08:00
parent 5ae5cfda03
commit 729b28ae43
2 changed files with 4 additions and 2 deletions

View File

@ -1358,6 +1358,8 @@ module ApplicationHelper
link_to l(:button_delete), url, options
end
def delete_new_link(url, options={})
options = {
:method => :delete,

View File

@ -42,13 +42,13 @@
</div>
<% end %>
</span>
<%# unless member.roles.first.to_s == "Manager"%>
<% unless member.user_id == @project.user_id %>
<a href="javascript:void(0) " class="c_dblue ml15 fl" onclick="$('#member-<%= member.id%>-roles-form').show();$(this).parent().height(110);">编辑</a>
<%= 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%>
</li>
<% end%>
</ul>