
<table class="table" cellspacing="0" cellpadding="0">
  <thead>
  <th width="10%">序号</th>
  <th width="30%">学校名称</th>
  <th width="50%">学校管理员</th>
  <th width="10%">操作</th>
  </thead>
  <tbody>
  <% if schools.size > 0 %>
    <% schools.each_with_index do |school, index| %>
    <tr id="table-school-<%= school.id %>">
      <td><%= list_index_no(@params_page.to_i, index) %></td>
      <td>
        <%= link_to "#{school.name}", "/ecs/department?school_id=#{school.id}", target: "_blank" %>
      </td>
      <td>
        <div class="add-manager-i">
          <%= link_to "<i class='fa fa-plus-circle font-18 color-grey-c'></i>".html_safe, "javascript:void(0)", class: "action", onclick: "show_add_manager('#{school.id}')" %>
        </div>
        <div class="inline-block school_user_list">
          <% if school.users.size > 0 %>
            <%= render partial: "admins/auth_schools/shared/school_user_list", locals: {users: school.users, school_id: school.id} %>
        <% end %>
        </div>
      </td>
      <td>
        <%= link_to "<i class='fa fa-trash-o color-grey-c font-18 padding10-5'></i>".html_safe, admins_auth_school_path(school), method: :delete, data: {confirm: "确认删除吗？"}, remote: true %>
      </td>
    </tr>
  <% end %>
  <% else %>
    <%= render 'admins/shared/no_data_for_table' %>
  <% end %>
  </tbody>
</table>

<%= render partial: 'admins/shared/paginate', locals: { objects: schools } %>