<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>作业列表页_老师界面</title>
  <%= stylesheet_link_tag  'css', :media => 'all' %>
</head>

<body>
<div id="content">
<div id="tb_" class="tb_">
  <% if @is_teacher %>
      <ul>
        <li id="tb_1" class="hovertab">
          <%= link_to "未批作品", get_not_batch_homework_homework_attach_index_path(:bid_id => @bid.id), { id: 'not_batch_homework', :remote => true}%>
        </li>
        <li id="tb_2" class="normaltab">
          <%= link_to "已改作品", get_batch_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
        </li>
        <li id="tb_3" class="normaltab">
          <%= link_to "全部作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
        </li>
        <li id="tb_4" class="normaltab">
          <%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
          (<span id="jours_count" class="c_red f_12"><%= @jours_count %></span>)
        </li>
        <li><%= link_to "作品打包下载", zipdown_assort_path(obj_class: @bid.class, obj_id: @bid, format: :json),
                        remote: true, class: "tb_all"  unless @bid.homeworks.empty? %>
        </li>
      </ul>
  <% else %>
      <ul>
        <% if @bid.open_anonymous_evaluation == 1%>
            <li id="tb_5" class="hovertab">
              <!-- 开启了匿评才能看到匿评列表 -->
                  <%= link_to @bid.comment_status == 2 ? "已评作品" : "待评作品", get_student_batch_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'student_batch_homework',:remote => true}%>
            </li>
        <% end %>
        <li id="tb_6" class="normaltab">
          <%= link_to "我的作品", get_my_homework_homework_attach_index_path(:bid_id => @bid.id), {id: 'my_homework',:remote => true}%>
        </li>
        <% if @bid.comment_status == 2 || @bid.open_anonymous_evaluation == 0%>
            <!-- 匿评结束后或者未开启匿评才能看到全部作业列表 -->
            <li id="tb_7" class="normaltab">
              <%= link_to "所有作品", get_homeworks_homework_attach_index_path(:bid_id => @bid.id), {id: 'all_homeworks',:remote => true}%>
            </li>
        <% end %>
        <li id="tb_8" class="normaltab">
          <%= link_to "留言", get_homework_jours_homework_attach_index_path(:bid_id => @bid.id), {:remote => true}%>
          (<span id="jours_count" class="c_red f_12">
            <%= @jours_count %>
          </span>)
        </li>
      </ul>
  <% end %>
</div>
<div class="cl"></div>
<div class="ctt">
  <div class="dis" id="tbc_01">
    <%= render :partial => 'homework_attach/homeworks_list',
               :locals => {:homeworks => @homework_list,
                           :remote => false,
                           :not_batch_homework => @not_batch_homework,:is_student_batch_homework => @is_student_batch_homework}%>
  </div>
</div>
</div>

<div id="light" class="upload_box">
  <a href="javascript:void(0)" onClick="document.getElementById('light').style.display='none';" class="close">
  </a>
  <div class="upload_box_" >
    <h2 class="upload_box_tit">下载文件包太大，分成多个下载包</h2>
    <ul class="upload_box_ul" >
      <li><span class="upload_box_span" >1.</span> <a href="javascript:void(0)">前20名学生的作品</a><span class="c_grey">&nbsp;&nbsp;（共200M）</span> </li>
    </ul>
    <div class="cl"></div>
  </div>
</div><!---upload_box en--->

<div id="show_homework_attach_model"></div>
</body>
</html>
