% @members.each do |member| %>
<%#= link_to_user_header member.principal,true,:class => "w150 c_orange fl" %>
<%= link_to "#{member.principal}(#{member.principal.show_name})", user_path(member.principal), :class => "w150 linkBlue fl" %>
<%= zh_course_role(h member.roles.sort.collect(&:to_s).join(', ')) %>
<%= form_for(member, {:as => :membership, :remote => true, :url => membership_path(member),
:method => :put,
:html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}}
) do |f| %>
<% @roles.each do |role| %>
<%= radio_button_tag 'membership[role_ids][]', role.id, member.roles.include?(role),
:disabled => member.member_roles.detect { |mr| mr.role_id == role.id && !mr.inherited_from.nil? } %>
<% end %>
<%= hidden_field_tag 'membership[role_ids][]', '' %>
<% end %>
<% unless member.roles.first.to_s == "Manager"%>
编辑
<%= delete_link membership_path(member),
:remote => true,
:class => "c_dblue w40 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%>