<table class="hwork-table-wrap">
  <tr class="b_grey hworkH30" style="border-bottom:1px solid #eaeaea;">
    <th class="hworkList30 hworkH30 pl5 pr5">序号</th>
    <th class="hworkList50">&nbsp;</th>
    <% if @homework.homework_type != 3 %>
      <th class="<%= @homework.homework_type == 2 ? 'hworkList80 pr10' : 'hworkList130 pr10'%>" style="text-align:left;">作品名称</th>
      <th class="<%=@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList60'%> pr10">
      <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl #{@homework.anonymous_comment == 1 ? 'ml35' : 'ml18'}" ,:remote => true%>
      <% if @show_all && @order == "lastname"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "lastname", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
      <% end%>
    </th>
    <th class="<%=@homework.anonymous_comment == 1 ? 'hworkList90' : 'hworkList80'%> pr10">
      <%= link_to "学号",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml30" ,:remote => true%>
      <% if @show_all && @order == "student_id"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_id", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
      <% end%>
    </th>
    <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 1 %>
        <th class="hworkList130 pr10" style="text-align:left;">作品名称</th>
        <th class="<%=@homework.anonymous_comment == 1 ? 'hworkList220' : 'hworkList160'%>">
          <span class="c_dark f14 fb">关联项目</span>
        </th>
    <% elsif @homework.homework_type == 3 && @homework.homework_detail_group.base_on_project == 0 %>
        <th class="<%=@homework.anonymous_comment == 1 ? 'hworkList340' : 'hworkList290' %> pr10" style="text-align:left;">作品名称</th>
    <% end %>
    <th class="hworkList130">
      <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml50" ,:remote => true%>
      <% if @show_all && @order == "created_at"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
      <% end%>
    </th>
    <th class="hworkList50">
      <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10" ,:remote => true%>
      <% if @show_all && @order == "teacher_score"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10" ,:remote => true%>
      <% end%>
    </th>
    <th class="hworkList50">
      <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
      <% if @show_all && @order == "teaching_asistant_score"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
      <% end%>
    </th>
    <% if @homework.homework_type == 2%>
        <th class="hworkList50">
          <%= link_to "系统",@show_all ? student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
          <% if @show_all && @order == "system_score"%>
              <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "system_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
          <% end%>
        </th>
    <% end%>
    <% if @homework.anonymous_comment == 0%>
        <th class="hworkList50">
          <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
          <% if @show_all && @order == "student_score"%>
              <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
          <% end%>
        </th>
    <% end %>
    <th class="hworkList50">
      <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)",:class => "c_dark f14 fb fl ml10",:remote => true%>
      <% if @show_all && @order == "score"%>
          <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name, :group => @group) ,:class => "#{@score == 'desc' ? 'st_up' : 'st_down'} mt10",:remote => true%>
      <% end%>
    </th>
  </tr>
  <% @stundet_works.each_with_index do |student_work, i|%>
          <%= render :partial => "evaluation_un_work", :locals => {:student_work => student_work, :index => i}%>
      <tr>
        <td colspan="12">
          <div id="about_hwork_<%= student_work.id%>">
          </div>
        </td>
      </tr>
  <% end%>
</table>