2016-03-03 10:38:37 +08:00
|
|
|
<script>
|
|
|
|
$(document).ready(function(){
|
|
|
|
$(".subjectChoose").click(function(){
|
|
|
|
$(".subjectChoose").removeClass("chooseActive");
|
|
|
|
$(this).addClass("chooseActive");
|
|
|
|
});
|
|
|
|
$(".popupClose").click(function(){
|
|
|
|
$(".popupWrap").hide();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<div class="f16 fb fontBlue mb10">选用资源库中的资源</div>
|
|
|
|
<div class="subjectList fl mr10">
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '6') %>" class="subjectChoose chooseActive fl" data-remote="true">公共资源</a>
|
|
|
|
<a href="<%= import_resources_user_path(User.current, :type => '1') %>" class="subjectChoose fl" data-remote="true">我的资源</a>
|
|
|
|
<%= form_tag( url_for(:controller => 'users', :action => 'resource_search', :id => User.current.id),
|
|
|
|
:remote => true , :method => 'get', :id => 'resource_search_form') do %>
|
|
|
|
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="subjectSearch fr" />
|
|
|
|
<%= hidden_field_tag(:type,type.nil? ? 1 : type) %>
|
|
|
|
<% end %>
|
|
|
|
|
2016-03-02 18:41:20 +08:00
|
|
|
<div class="cl"></div>
|
2016-03-03 10:38:37 +08:00
|
|
|
<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>
|
|
|
|
<% @attachments.each do |attach| %>
|
|
|
|
<ul class="subjectRow">
|
|
|
|
<li class="subjectName fl hidden">
|
|
|
|
<label>
|
|
|
|
<input name="checkbox1[]" type="checkbox" data-has-history="<%= attach.attachment_histories.count == 0 ? 'N' : 'Y' %>" data-deleteble="<%= User.current.id ==attach.author_id ? 'Y' : 'N' %>" onclick="checkAllBox($(this));" value="<%= attach.id%>" class="mr5" style="vertical-align:middle;" />
|
|
|
|
<span><%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename%></span>
|
|
|
|
</label>
|
|
|
|
</li>
|
|
|
|
<li class="subjectType fl"><%= get_resource_type(attach.container_type)%></li>
|
|
|
|
<li class="subjectCount fl"><%= number_to_human_size(attach.filesize) %></li>
|
|
|
|
<li class="subjectPublisher fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
|
|
|
<li class="fl subjectDate"><%= format_date(attach.created_on) %></li>
|
|
|
|
</ul>
|
|
|
|
<% end %>
|
2016-03-02 18:41:20 +08:00
|
|
|
</div>
|
2016-03-03 10:38:37 +08:00
|
|
|
|
|
|
|
<div class="courseSendSubmit mr15"><a href="javascript:void(0);" class="sendSourceText">选用</a></div>
|
|
|
|
<div class="courseSendCancel"><a href="javascript:void(0);" class="sendSourceText">取消</a></div>
|
|
|
|
<div class="pageRoll mt0">
|
2016-03-02 18:41:20 +08:00
|
|
|
<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>
|