2016-03-05 03:14:57 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
<% if type == "1" %>
|
|
|
|
$("#my_resources_choose").addClass("choose-active");
|
|
|
|
$("#public_resources_choose").removeClass("choose-active");
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
$(".subject-choose").click(function(){
|
|
|
|
$(".subject-choose").removeClass("choose-active");
|
|
|
|
$(this).addClass("choose-active");
|
|
|
|
});
|
|
|
|
$(".popupClose").click(function(){
|
|
|
|
$(".popupWrap").hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div class="f16 fb fontBlue mb10">选用资源库中的资源</div>
|
|
|
|
<div class="subjectList fl mr10">
|
|
|
|
<% if !params[:course_id].nil? %>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '6', :course_id => params[:course_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '1', :course_id => params[:course_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
|
|
|
|
<% elsif !params[:project_id].nil? %>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '6', :project_id => params[:project_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '1', :project_id => params[:project_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
|
|
|
|
<% elsif !params[:subfield_file_id].nil? %>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '6', :subfield_file_id => params[:subfield_file_id]) %>" id="public_resources_choose" class="subject-choose choose-active fl" data-remote="true">公共资源</a>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '1', :subfield_file_id => params[:subfield_file_id]) %>" id="my_resources_choose" class="subject-choose fl" data-remote="true">我的资源</a>
|
|
|
|
<% end %>
|
2016-03-16 17:06:11 +08:00
|
|
|
<div id="user_import_resource_search">
|
2016-03-18 15:17:49 +08:00
|
|
|
<%=render :partial=>'users/user_import_resource_search', :locals => {:type => @type, :search => '', :mul_id => @resource_id, :mul_type => @resource_type} %>
|
2016-03-16 17:06:11 +08:00
|
|
|
</div>
|
|
|
|
<!--<%#= form_tag( url_for(:controller => 'users', :action => 'import_resources_search', :id => User.current.id), :remote => true , :method => 'get', :id => 'resource_search_form') do %>-->
|
2016-03-05 03:14:57 +08:00
|
|
|
<!--<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="subjectSearch fr" />-->
|
2016-03-16 17:06:11 +08:00
|
|
|
<!--<%#= hidden_field_tag(:type,type.nil? ? 1 : type) %>-->
|
|
|
|
<!--<%#= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none' %>-->
|
|
|
|
<!--<%# end %>-->
|
2016-03-05 03:14:57 +08:00
|
|
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
|
|
|
<div style="height:441px; min-height:441px; max-height:441px;">
|
|
|
|
<ul class="subjectBanner mt10">
|
|
|
|
<li class="subjectName fl hidden"><span style="padding-left:15px;">资源名称</span></li>
|
|
|
|
<li class="subjectType fl">类别</li>
|
|
|
|
<li class="subjectCount fl">大小</li>
|
|
|
|
<li class="subjectPublisher fl">上传者</li>
|
|
|
|
<li class="fl subjectDate">上传时间</li>
|
|
|
|
</ul>
|
2016-03-16 17:06:11 +08:00
|
|
|
<div id="import_resource_info_list">
|
|
|
|
<%= render :partial => 'users/user_import_resource_list',:locals => {:project_id => params[:project_id], :subfield_file_id => params[:subfield_file_id], :course_id => params[:course_id]} %>
|
|
|
|
</div>
|
|
|
|
|
2016-03-05 03:14:57 +08:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText" onclick="$('#resource_import_container_form').submit();hideModal()">选用</a></div>
|
|
|
|
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText" onclick="hideModal()">取消</a></div>
|
|
|
|
|
|
|
|
<div class="pageRoll mt0">
|
|
|
|
<ul class="wlist" id="pages" style="margin-top: 5px;">
|
|
|
|
<%= pagination_links_full @atta_pages, @atta_count, :per_page_links => false, :remote => @is_remote, :flag => true %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|