2015-12-27 23:24:21 +08:00
|
|
|
|
2014-11-19 17:40:24 +08:00
|
|
|
<script>
|
2015-12-27 23:24:21 +08:00
|
|
|
$(function(){
|
|
|
|
$("#RSide").removeAttr("id")
|
2015-12-28 16:19:30 +08:00
|
|
|
$("#container").css('width',"1000px")
|
2015-12-27 23:24:21 +08:00
|
|
|
});
|
2015-05-20 11:56:34 +08:00
|
|
|
function searchone4reload(fileid){
|
|
|
|
var url = "<%= searchone4reload_course_files_path(@course)%>";
|
|
|
|
var data = {};data.fileid=fileid;
|
|
|
|
$.ajax({
|
|
|
|
url:url,dataType:'text',data:data,success:function(text){
|
|
|
|
var container_file_div = $("#container_files_"+fileid);
|
|
|
|
container_file_div.after(text);
|
|
|
|
container_file_div.remove();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
2015-04-15 16:00:45 +08:00
|
|
|
function show_upload(obj)
|
2014-12-01 16:34:25 +08:00
|
|
|
{
|
2015-04-15 16:00:45 +08:00
|
|
|
switch(obj)
|
|
|
|
{
|
|
|
|
case 1:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 1}) %>');
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 2}) %>');
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 3}) %>');
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 4}) %>');
|
|
|
|
break;
|
2015-11-03 10:28:13 +08:00
|
|
|
case 6:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 6}) %>');
|
|
|
|
break;
|
2015-04-15 16:00:45 +08:00
|
|
|
default:
|
|
|
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'upload_show',:locals => {:course => @course,:course_attachment_type => 5}) %>');
|
|
|
|
}
|
2014-12-01 16:34:25 +08:00
|
|
|
showModal('ajax-modal', '513px');
|
|
|
|
$('#ajax-modal').siblings().remove();
|
2015-06-05 10:25:58 +08:00
|
|
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal()' style='margin-left: 480px;'><img src='/images/bid/close.png' width='26px' height='26px' /></a>");
|
2016-01-20 16:03:28 +08:00
|
|
|
$('#ajax-modal').parent().css("top","").css("left","").css("border","3px solid #269ac9");
|
2015-03-25 14:26:33 +08:00
|
|
|
$('#ajax-modal').parent().addClass("popbox_polls");
|
2014-12-01 16:34:25 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
function closeModal()
|
|
|
|
{
|
|
|
|
hideModal($("#popbox_upload"));
|
|
|
|
}
|
|
|
|
|
|
|
|
function presscss(id)
|
|
|
|
{
|
|
|
|
if(id == "incourse")
|
|
|
|
{
|
|
|
|
$('#incourse').attr("class", "re_schbtn b_dblue");
|
|
|
|
$('#insite').attr("class", "re_schbtn b_lblue");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$('#incourse').attr("class", "re_schbtn b_lblue");
|
|
|
|
$('#insite').attr("class", "re_schbtn b_dblue");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function buttoncss()
|
|
|
|
{
|
|
|
|
$('#incourse').attr("class", "re_schbtn b_lblue");
|
|
|
|
$('#insite').attr("class", "re_schbtn b_lblue");
|
|
|
|
}
|
2014-11-19 17:40:24 +08:00
|
|
|
</script>
|
2014-06-09 14:23:31 +08:00
|
|
|
|
2015-12-27 23:24:21 +08:00
|
|
|
<div class="homepageRight mt0 ml10">
|
|
|
|
<div class="homepageRightBanner">
|
|
|
|
<div class="NewsBannerName">资源库</div>
|
|
|
|
<ul class="resourcesSelect">
|
|
|
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
|
|
|
<ul class="resourcesType">
|
2015-12-28 16:19:30 +08:00
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','','<%= @q%>','<%= @course.id%>');" class="resourcesTypeAll resourcesGrey">全部</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','课件','<%= @q%>','<%= @course.id%>');" class="homepagePostTypeAssignment postTypeGrey">课件</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','软件','<%= @q%>','<%= @course.id%>');" class="softwareIcon postTypeGrey">软件</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','媒体','<%= @q%>','<%= @course.id%>');" class="mediaIcon resourcesGrey">媒体</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','代码','<%= @q%>','<%= @course.id%>');" class="codeIcon resourcesGrey">代码</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course)%>','论文','<%= @q%>','<%= @course.id%>');" class="thesisIcon resourcesGrey">论文</a></li>
|
|
|
|
<li><a href="javascript:void(0);" onclick="search_tag_attachment('<%= search_tag_attachment_course_files_path(@course,:other=>true)%>','其他','<%= @q%>','<%= @course.id%>');" class="othersIcon resourcesGrey">其它</a></li>
|
2015-12-27 23:24:21 +08:00
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
2016-07-07 16:46:41 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<% unless User.current.logged? %>
|
|
|
|
<div class="syllabusbox_tishi mt10">
|
|
|
|
<p style="text-align: center;">您尚未登录,<a href='<%= signin_url_without_domain %>' class='syllabusbox_a_blue' target='_Blank' >登录</a>
|
|
|
|
后可浏览更多信息
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
2015-12-27 23:24:21 +08:00
|
|
|
<div class="resources mt10" style="padding-bottom:5px;">
|
|
|
|
<div class="reTop mb5">
|
|
|
|
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search",:remote=>true) do %>
|
|
|
|
<%= text_field_tag 'name', params[:name], name: "name", :class => 'researchBox fl',:style=>"padding: 0px"%>
|
|
|
|
<%= submit_tag "课内搜索", :class => "blueBtn mr5 fl",:name => "incourse",:id => "incourse" %>
|
2016-03-04 16:10:41 +08:00
|
|
|
<%#= submit_tag "全站搜索", :class => "blueBtn mr5 fl",:name => "insite",:id => "insite" %>
|
2015-12-27 23:24:21 +08:00
|
|
|
<% if is_course_teacher(User.current,@course) || (@course.publish_resource==1 && User.current.member_of_course?(@course) ) %>
|
2016-03-03 10:38:37 +08:00
|
|
|
<input class="blueBtn fr mr5" value="上传资源" onclick="course_files_upload();">
|
2016-03-03 17:15:47 +08:00
|
|
|
<%= link_to("导入资源", import_resources_user_path(User.current, :type => 6, :course_id => @course.id), :class => "blue-btn fr mr5", :remote => true) %>
|
2015-12-27 23:24:21 +08:00
|
|
|
<% end %>
|
2014-12-01 16:34:25 +08:00
|
|
|
<% end %>
|
2014-11-18 18:02:01 +08:00
|
|
|
|
2015-12-27 23:24:21 +08:00
|
|
|
<!-- show_window('light','fade','20%','35%')-->
|
|
|
|
<!--<a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload();">上传资源</a>-->
|
|
|
|
</div>
|
2015-12-28 16:19:30 +08:00
|
|
|
<div>
|
|
|
|
<div class="fileTagWrap" id="files_tag">
|
2016-01-05 10:01:56 +08:00
|
|
|
<%= render :partial => "files/tag_yun", :locals => {:tag_list => @tag_list,:course => @course,:tag_name => @tag_name}%>
|
2015-12-28 16:19:30 +08:00
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
<div class="re_con_top">
|
|
|
|
<p class="f_l fontBlue f_b f_14">共有 <span id="attachment_count"><%= @all_attachments.count%></span> 个资源</p>
|
2016-03-18 11:04:43 +08:00
|
|
|
<p class="f_r" style="color: #808080" id="course_filter_order">
|
|
|
|
<%= render :partial => 'course_file_filter_order', :locals => {:remote => @is_remote, :sort => @sort, :order => @order} %>
|
2015-12-28 16:19:30 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
2015-12-27 23:24:21 +08:00
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
2014-12-01 16:34:25 +08:00
|
|
|
</div>
|
2015-12-28 16:19:30 +08:00
|
|
|
<div id="course_list">
|
2016-03-18 15:17:49 +08:00
|
|
|
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
|
2015-12-28 16:19:30 +08:00
|
|
|
</div>
|
2014-11-18 18:02:01 +08:00
|
|
|
</div>
|
2016-01-22 19:49:05 +08:00
|
|
|
<%# html_title(l(:label_attachment_plural)) -%>
|