<div class="sy_classbox" >
  <% if homeworks.empty? %>
      <div class="icons_tishi"><img src="/images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
      <p class="sy_tab_con_p">暂无可显示的内容~</p>
  <% else %>
    <% homeworks.each do |homework| %>
      <ul class="sy_classlist">
        <span class="hw_icons_cir fl mt5 mr5"></span>
        <div class="fl ">
          <h3 class="sy_classlist_title fl">
            <%= link_to homework.name, student_work_index_path(:homework => homework.id), :class => 'sy_cblack', :target => '_blank' %>
          </h3>
          <div class="cl"></div>
          <p class="sy_cgrey clear">
            <span class="fl">来源：</span>
            <span class="hw_classname mr15 fl">
              <%=link_to homework.course.syllabus.title, syllabus_path(homework.course.syllabus_id), :class => 'hw_cgrey', :target => '_blank' %>
              <span> • </span>
              <%= link_to homework.course.name, course_path(homework.course), :target => '_blank', :class => 'hw_cgrey' %>
            </span>
            <span class="mr15 fl">类别：<%=homework.homework_type_ch %></span>
            <span class="fl">作品：</span>
            <span class="sy_corange hw_w30 fl "><%=homework.student_works.has_committed.count %></span>
            <span class="fl">/</span>
            <span class="sy_cgrey hw_w30 fl mr15"><%= homework.homework_type == 3 ? '--' : homework.course.student.count %></span>
            <span class="fl">待评阅：</span>
            <span class="sy_corange hw_w30 fl"><%= homework.student_works.has_committed.where("teacher_score is null and teaching_asistant_score is null").count %></span>
            <span class="fl">/</span>
            <span class="sy_cgrey hw_w30 fl mr15"><%=homework.student_works.has_committed.count %></span>
            <span class="mr15 fl">发布时间：
              <% if homework.publish_time %>
                <%= format_date(homework.publish_time) %>
              <% else %>
                <span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span>
              <% end %>
            </span>
            <span class="mr15 fl"><%=(cur_homework_end_time homework).html_safe %></span>
          </p>
        </div>
        <% if homework.student_works.has_committed.count == 0 %>
            <%= link_to '编&nbsp;&nbsp;&nbsp;&nbsp;辑'.html_safe, edit_homework_common_path(homework, :is_manage => is_manage), :class => 'hw_btn_green fr mt5', :target => '_blank' %>
        <% else %>
            <%= link_to '评&nbsp;&nbsp;&nbsp;&nbsp;分'.html_safe, student_work_index_path(:homework => homework.id), :class => 'hw_btn_green fr mt5', :target => '_blank' %>
      <% end %>
        <div class="cl"></div>
      </ul>
    <% end %>
  <% end %>
</div>