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

53 lines
2.6 KiB
Plaintext
Raw Normal View History

2016-01-27 17:26:57 +08:00
<div class="w985" style="padding:11px;"> <a href="javascript:void(0);" class="popupClose" onclick="hideModal()"></a>
<div class="f16 fb fontBlue mb10">选用题库中的题目</div>
<div class="subjectList fl mr10">
<a href="<%= user_homework_type_user_path(@user) %>" id="public_homeworks_choose" class="subjectChoose chooseActive fl" data-remote="true">公共题库</a>
<a href="<%= user_homework_type_user_path(@user,:type=>'2') %>" id="user_homeworks_choose" class="subjectChoose fl" data-remote="true">我的题库</a>
<div id="homework_search_input">
<%=render :partial=>'homework_search_input', :locals=>{:type=>@type} %>
</div>
<div class="cl"></div>
<div>
<ul class="subjectBanner mt10">
<li class="subjectName fl hidden"><span style="padding-left:15px;">作业名称</span></li>
2016-01-28 16:27:46 +08:00
<li class="subjectType fl">类型</li>
<li class="subjectCount fl">引用数</li>
2016-01-27 17:26:57 +08:00
<li class="subjectPublisher fl">贡献者</li>
<li class="fl subjectDate">发布时间</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%>">
2016-01-28 09:51:05 +08:00
<div style="height:450px; min-height:450px; max-height:450px;" id="homework_list_form_show">
2016-01-27 17:26:57 +08:00
<%= 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>
2015-08-27 16:03:41 +08:00
</div>
2016-01-27 17:26:57 +08:00
<div class="subjectDetail fl" id="homework_detail_information">
<%=render :partial=>'homework_detail_information', :locals=>{:homework=>nil} %>
2015-08-27 16:03:41 +08:00
</div>
<div class="cl"></div>
2016-01-27 17:26:57 +08:00
</div>
<script type="text/javascript">
$("#public_homeworks_choose").click(function(){
$(this).toggleClass("chooseActive");
$("#user_homeworks_choose").toggleClass("chooseActive");
});
$("#user_homeworks_choose").click(function(){
$(this).toggleClass("chooseActive");
$("#public_homeworks_choose").toggleClass("chooseActive");
});
</script>