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

68 lines
3.2 KiB
Plaintext

<%= stylesheet_link_tag 'css/org','repository' %>
<script>
function g(o){return document.getElementById(o);}
function HoverLi(n, url){
for(var i=1;i<=2;i++){
g('hw_tab_nav_'+i).className='hw_tab_nomal';
}
g('hw_tab_nav_'+n).className='hw_tab_hover';
$.get(url, {}, function(data){});
}
function show_homework_detail(url){
$.get(
url,
{},
function (data) {
}
);
};
function choose_course(user_id, hw_id) {
$.ajax({
type: 'get',
url: '/users/' + user_id + '/choose_user_course?homework='+hw_id
});
}
</script>
<div class="hw_content mb10">
<ul id="hw_tab_nav">
<li id="hw_tab_nav_1" class="hw_tab_hover" onclick="HoverLi(1, '<%= user_homework_type_user_path(@user,:is_import => 0) %>');">
<a href="javascript:void(0)" id="public_homeworks_choose" class="hw_tab_type" style="text-align: center;">我的题库</a>
</li>
<li id="hw_tab_nav_2" onclick="HoverLi(2, '<%= user_homework_type_user_path(@user,:type=>'2',:is_import => 0) %>');">
<a href="javascript:void(0)" id="user_homeworks_choose" class="hw_tab_type" style="text-align: center;">公共题库</a>
</li>
</ul>
<div class="hw_more_box" >
<ul>
<li class="hw_more_icons">
<ul class="hw_more_txt">
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0) %>" id="homework_type_all" class="hw_more_li" data-method="get" data-remote="true">全部作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 1) %>" id="homework_type_nor" class="hw_more_li" data-method="get" data-remote="true">普通作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 2) %>" id="homework_type_pro" class="hw_more_li" data-method="get" data-remote="true" style="white-space:nowrap;">编程作业</a> </li>
<li> <a href="<%= user_homework_type_user_path(@user,:type => @type,:is_import => 0,:property => 3) %>" id="homework_type_gro" class="hw_more_li" data-method="get" data-remote="true">分组作业</a> </li>
</ul>
</li>
</ul>
</div>
<div class="cl"></div>
<div id="hw_tab_con_1">
<div class="sy_category" id="homework_search_input">
<%=render :partial=>'homework_repository_search', :locals=>{:type => '1',:is_import => 0,:property => nil,:order => @order, :search => ''} %>
</div>
<div class="sy_classbox" style="min-height:800px;" id="homework_repository_list">
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>'1',:is_import => 0,:property => @property,:search=>''} %>
</div>
<div style="text-align:center;">
<div class="pages" style="width:auto; display:inline-block;">
<ul id="homework_pository_ref_pages">
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
</ul>
<div class="cl"></div>
</div>
</div>
</div>
</div>