<% @members.each_with_index do |member, index| %> <% end %>
序号 姓名 单位 角色 操作
<%= index + 1 %> <%= link_to member.user.show_name, user_path(member.user), :class => "pro_new_idname ml10 mr10", :title => "#{member.user.show_name}" %> <%=member.user.user_extensions.school ? member.user.user_extensions.school.name : '--' %> <%= zh_contest_role(h member.roles.sort.collect(&:to_s).join(', ')) %> <%= form_for(member, {:as => :membership, :remote => true, :url => contest_member_path(member), :method => :put, :html => {:id => "member-#{member.id}-roles-form", :class => 'hol'}} ) do |f| %>
    <% @roles.each do |role| %> <% if (member.user == @contest.user && role.id != 15) || member.user != @contest.user %>
  • <%= check_box_tag 'membership[role_ids][]', role.id, member.roles.include?(role), :id => "edit_member_role_#{member.id}_#{role.id}", :disabled => member.user == @contest.user && role.id == 13, :class => "mt6 fl h28" %> <% if member.user == @contest.user && role.id == 13 %> <%= hidden_field_tag 'membership[role_ids][]', '13' %> <% end %>

    <%= zh_contest_role(h role) %>

  • <% end %> <% end %>
<% end %>
<% if User.current.admin_of_contest?(@contest) %> 编辑 <% unless member.user == @contest.user %> 删除 <%#= delete_link contest_member_path(member), :remote => true, :class => "sy_btn_grey mr5", :id => "delete_member_#{member.id}", :data => ({confirm: l(:label_delete_confirm)}) %> <% end %> <% end%>