socialforge/app/views/users/_show_user_homeworks.html.erb

54 lines
2.8 KiB
Plaintext

<div class="w985"> <a href="javascript:void(0);" class="popup-close" onclick="hideModal()"></a>
<div class="f16 fb fontBlue mb10">选用题库中的题目</div>
<div class="subject-list fl mr10">
<a href="<%= user_homework_type_user_path(@user,:is_import => 1) %>" id="public_homeworks_choose" class="resource-tab resource-tab-active fl" data-remote="true">公共题库</a>
<a href="<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 1) %>" id="user_homeworks_choose" class="resource-tab fl" data-remote="true">我的题库</a>
<div id="homework_search_input">
<%=render :partial=>'homework_search_input', :locals=>{:type => @type,:is_import => 1} %>
</div>
<div class="cl"></div>
<div>
<ul class="subject-pop-banner mt10">
<li class="subject-pop-name fl hidden"><span style="padding-left:15px;">作业名称</span></li>
<li class="subject-pop-from fl">来源</li>
<li class="subject-pop-type fl">类别</li>
<li class="subject-pop-publisher fl">贡献者</li>
<li class="subject-pop-count fl">引用数</li>
<li class="subject-pop-date fl">发布时间</li>
</ul>
</div>
<%= form_tag(user_select_homework_users_path, :multipart => true,:remote => true,:name=>"select_homework_form",:id=>'select_homework_form') do %>
<input type="hidden" name="select_course" value="<%= @select_course%>">
<div style="height:450px; min-height:450px; max-height:450px;" id="homework_list_form_show">
<%= render :partial => 'users/show_user_homework_form', :locals => {:homeworks => @homeworks}%>
</div>
<% end %>
<div class="courseSendSubmit mr15">
<a href="javascript:void(0);" class="sendSourceText" onclick="$('#select_homework_form').submit();hideModal()">选用</a>
</div>
<div class="courseSendCancel">
<a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a>
</div>
<div >
<ul class="wlist" id="homewrok_ref_pages" style="margin-top: 5px;margin-right: 20px">
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
</ul>
</div>
<div class="cl"></div>
</div>
<div class="subject-detail fl" id="homework_detail_information">
<%=render :partial=>'homework_detail_information', :locals=>{:homework=>nil} %>
</div>
<div class="cl"></div>
</div>
<script type="text/javascript">
$("#public_homeworks_choose").click(function(){
$(this).toggleClass("resource-tab-active");
$("#user_homeworks_choose").toggleClass("resource-tab-active");
});
$("#user_homeworks_choose").click(function(){
$(this).toggleClass("resource-tab-active");
$("#public_homeworks_choose").toggleClass("resource-tab-active");
});
</script>