<div class="hw_popup_box" style="padding-bottom:30px;">
  <div class="hw_popup_top clear">
    <a href="javascript:void(0);" class="hw_icons_close fr" style="outline: none;" onclick="hideModal()"></a>
  </div>
  <div class="hw_popup_con">
    <div class="clear">
      <h3 class="sy_classlist_title fl"><%=@homework.name %></h3>
      <span class="hw_icon_open fl mt3"></span>
    </div>
    <span class=" mr15">作者：<%=link_to @homework.user.show_name, user_path(@homework.user_id), :class => 'hw_cgrey', :target => '_blank'%></span>
    <div class="hw_popup_txt">
      <p><%=@homework.description.html_safe %></p>
      <% if @homework.homework_type == 2 %>
          <p class="subjectContent mt10">
            测试集：<%=@homework.homework_tests.count %>组
          </p>
          <% if @homework.user == User.current && @homework.homework_tests.count > 0 %>
              <table class="hw_popup_testtable" cellpadding="0" cellspacing="0">
                <tbody>
                <tr>
                  <td class="test_td_min">&nbsp;</td>
                  <td class="test_td_title">测试集输入</td>
                  <td class="test_td_title">测试集输出</td>
                </tr>
                <% @homework.homework_tests.each_with_index do |test, i| %>
                    <tr>
                      <td class="test_td_min"><%=i+1 %></td>
                      <td><%=test.input %></td>
                      <td ><%=test.output %></td>
                    </tr>
                <% end %>
                </tbody>
              </table>
          <% end %>
      <% elsif @homework.homework_type ==3 && @homework.homework_detail_group %>
          <p class="subjectContent mt10">
            分组人数：<%=@homework.homework_detail_group.min_num %> - <%=@homework.homework_detail_group.max_num %>人
          </p>
      <% end %>
    </div>
  </div>
</div>
