2014-11-19 17:40:24 +08:00
|
|
|
<script>
|
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;
|
|
|
|
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-04-10 11:44:13 +08:00
|
|
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;padding-left: 513px;'><a href='javascript:void(0)' onclick='closeModal()'><img src='/images/bid/close.png' width='26px' height='26px' /></a></span>");
|
2015-03-25 14:26:33 +08:00
|
|
|
$('#ajax-modal').parent().css("top","").css("left","");
|
|
|
|
$('#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
|
|
|
|
2014-11-18 18:02:01 +08:00
|
|
|
<div class="container">
|
2014-12-01 16:34:25 +08:00
|
|
|
<div class="resource"><!--资源库内容开始--->
|
|
|
|
<div class="re_top">
|
2014-11-21 11:38:53 +08:00
|
|
|
<%= form_tag( search_course_files_path(@course), method: 'get',:class => "re_search f_l",:remote=>true) do %>
|
|
|
|
<%= text_field_tag 'name', params[:name], name: "name", :class => 're_schbox',:style=>"padding: 0px"%>
|
2014-12-01 16:34:25 +08:00
|
|
|
<%= submit_tag "课内搜索", :class => "re_schbtn b_lblue",:name => "incourse",:id => "incourse", :onmouseover => "presscss('incourse')",:onmouseout =>"buttoncss()" %>
|
|
|
|
<%= submit_tag "全站搜索", :class => "re_schbtn b_lblue",:name => "insite",:id => "insite",:onmouseover => "presscss('insite')",:onmouseout =>"buttoncss()" %>
|
2014-11-21 11:38:53 +08:00
|
|
|
<% end %>
|
2015-03-25 14:26:33 +08:00
|
|
|
<% if is_course_teacher(User.current,@course) %> <!-- show_window('light','fade','20%','35%')-->
|
2015-04-15 14:53:07 +08:00
|
|
|
<!--<a href="javascript:void(0)" class="re_fabu f_r b_lblue" onclick="show_upload();">上传资源</a>-->
|
|
|
|
<p class="c_grey fr mt10 mr5">
|
|
|
|
上传:
|
2015-04-15 16:00:45 +08:00
|
|
|
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(1);">课件</a> |
|
|
|
|
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(2);">软件</a> |
|
|
|
|
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(3);">媒体</a> |
|
|
|
|
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(4);">代码</a> |
|
|
|
|
<a href="javascript:void(0);" class=" c_dblue" onclick="show_upload(5);">其他</a>
|
2015-04-15 14:53:07 +08:00
|
|
|
</p>
|
2014-12-01 16:34:25 +08:00
|
|
|
<% end %>
|
|
|
|
</div><!---re_top end-->
|
|
|
|
<div class="cl"></div>
|
2014-11-18 18:02:01 +08:00
|
|
|
|
2014-12-01 16:34:25 +08:00
|
|
|
<div class="re_con" id="course_list">
|
2015-03-30 17:14:52 +08:00
|
|
|
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
|
2014-12-01 16:34:25 +08:00
|
|
|
</div><!---re_con end-->
|
2014-11-18 18:02:01 +08:00
|
|
|
|
2014-12-01 16:34:25 +08:00
|
|
|
</div>
|
2014-11-18 18:02:01 +08:00
|
|
|
</div>
|
2014-10-28 22:34:51 +08:00
|
|
|
<% html_title(l(:label_attachment_plural)) -%>
|