<table class="table table-hover glcc_pr_check-list-table">
  <thead class="thead-light">
    <tr>
      <th width="3%">序号</th>
      <th width="4%" class="text-left">学生姓名</th>
      <th width="3%" class="text-left">课题ID</th>
      <th width="10%" class="text-left">课题名称</th>
      <th width="10%">邮件地址</th>
      <th width="15%">视频地址</th>
      <th width="15%">PR地址</th>
      60
      <th width="5%">考核阶段</th>
      <th width="4%">白名单</th>
      <th width="15%">检测状态</th>
      <th width="6%">提交时间</th></th>
    </tr>
  </thead>
  <tbody>
    <% if examine_materials.present? %>
      <% examine_materials.each_with_index do |material, index| %>
        <tr class="user-item-<%= material.id %>">
          <td><%= list_index_no((params[:page] || 1).to_i, index) %></td>
          <td><%= material.glcc_student.student_name %></td>
          <td><%= material.task_id %></td>
          <td><%= material.task.task_name %></td>
          <td>
            <span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.glcc_student.mail%>">
                <%=material.glcc_student.mail.truncate(20) %>
            </span>
          </td>

          <td>
            <span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.defence_video_url%>">
              <a href="javascript:">
                <%= material.defence_video_url.nil? ? "" : material.defence_video_url.truncate(30) %>
              </a>
            </span>
          </td>
          <td>
            <span class="d-inline-block" tabindex="0" data-toggle="tooltip" data-placement="left" title="<%= material.code_or_pr_url%>">
              <a href="javascript:">
                <%= material.code_or_pr_url.nil? ? "" : material.code_or_pr_url.truncate(30) %>
              </a>
            </span>
          </td>
          <td><%= material.term == 1 ? "中期考核" : "结项考核"%></td>
          <td><%= material.white_list ? "是":"否" %></td>
          <td><%= material.state_to_html.blank?&&!material.white_list  ? "通过" : material.state_to_html.html_safe %></td>
          <td><%= material.created_on.strftime("%Y-%m-%d %H:%M")%></td>
        </tr>
      <% end %>
    <% else %>
      <%= render 'admins/shared/no_data_for_table' %>
    <% end %>
  </tbody>
</table>

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