修改项目创始人不能删除自己
This commit is contained in:
parent
5ae5cfda03
commit
729b28ae43
|
@ -1358,6 +1358,8 @@ module ApplicationHelper
|
|||
link_to l(:button_delete), url, options
|
||||
end
|
||||
|
||||
|
||||
|
||||
def delete_new_link(url, options={})
|
||||
options = {
|
||||
:method => :delete,
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue