<table class="hwork-table-wrap" id="homework_table">
  <%# if @homework.homework_type == 1 %>
      <%#= render :partial => 'evaluation_un_common_title' %>
  <%# elsif @homework.homework_type == 2 %>
      <%#= render :partial => 'evaluation_un_pro_title' %>
  <%# elsif @homework.homework_type == 3 %>
      <%#= render :partial => 'evaluation_un_group_title' %>
  <%# else %>
      <tr class="b_grey hworkH30">
        <th class="hworkList40 hworkH30 pl5 pr5">序号</th>
        <th class="hworkList50">&nbsp;</th>
        <% if @homework.homework_type != 3 %>
            <th class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList100') : (@homework.anonymous_comment == 1 ? 'hworkList110' : 'hworkList60') %> pl5 pr5 hide-text">
              <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
              <% end %>
            </th>
            <th class="<%= @homework.homework_type == 1 ? (@homework.anonymous_comment == 1 ? 'hworkList130' : 'hworkList90') : (@homework.anonymous_comment == 1 ? 'hworkList100' : 'hworkList80') %> pl5 pr5 hide-text">
              <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
              <% end %>
            </th>
        <% else %>
            <% if @homework.homework_detail_group.base_on_project == 1 %>
                <th class="hworkList130  pl5 pr5" style="text-align:left;">组长</th>
                <th class="<%= @homework.anonymous_comment == 1 ? 'hworkList140' : 'hworkList70' %>">
                  <span class="c_dark f14 fb">关联项目</span>
                </th>
            <% elsif @homework.homework_detail_group.base_on_project == 0 %>
                <th class="<%= @homework.anonymous_comment == 1 ? 'hworkList270' : 'hworkList200' %>  pl5 pr5" style="text-align:left;">组长</th>
            <% end %>
        <% end %>
        <th class="<%= @homework.homework_type ==2 ? 'hworkList110' : 'hworkList130' %>">
          <%= link_to "状态", @show_all ? student_work_index_path(:homework => @homework.id, :order => "work_status", :sort => @score, :name => @name, :group => @group) : "javascript:void(0)", :class => "c_dark f14 fb", :remote => true %>
          <% if @show_all && @order == "work_status" %>
              <%= link_to "", student_work_index_path(:homework => @homework.id, :order => "work_status", :sort => @score, :name => @name, :group => @group), :class => "#{@score == 'desc' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
          <% end %>
        </th>
        <th class="hworkList70">
          <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
          <% end %>
        </th>
        <th class="hworkList70">
          <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
          <% end %>
        </th>
        <% if @homework.homework_type == 2 %>
            <th class="hworkList70">
              <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
              <% end %>
            </th>
        <% end %>
        <% if @homework.anonymous_comment == 0 %>
            <th class="hworkList70">
              <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
              <% end %>
            </th>
        <% end %>
        <th class="hworkList70">
          <%= 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", :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' ? 'sort_up' : 'sort_down'} float-none", :style => "line-height:30px; vertical-align:middle;", :remote => true %>
          <% end %>
        </th>
      </tr>
  <%# end %>
  <% @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 %>" class="about_hwork">
          </div>
        </td>
      </tr>
  <% end %>
</table>