<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 fl mr15">
              <%=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>
            <% my_work = cur_user_works_for_homework(homework) %>
            <span class="fl">状态：</span><span class="<%= my_work ? '' : 'hw_cir_nomal hw_cir_lorange' %> fl mr15"><%= my_work ? '已提交' : '未提交' %></span>
            <span class="fl">作品：</span><span class="sy_corange hw_w20 fl mr15"><%=homework.student_works.has_committed.count %></span>
            <span class="fl">成绩：</span>
            <% if my_work && !my_work.work_score.nil? %>
                <span class="sy_corange hw_w40 fl mr15"><%= format("%.1f",my_work.work_score.to_f) %></span>
            <% else %>
                <span class="sy_cgrey hw_w40 fl mr15">--</span>
            <% end %>
            <span class="mr15 fl">发布时间：<%= format_date homework.publish_time %></span>
            <span class="mr15 fl"><%=cur_homework_end_time homework %></span>
          </p>
        </div>
        <%= student_for_homework_common homework %>
        <div class="cl"></div>
      </ul>
    <% end %>
  <% end %>
</div>