资源库
This commit is contained in:
parent
81f54e44b4
commit
8edaa9d2bd
|
@ -697,6 +697,8 @@ class UsersController < ApplicationController
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon')").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon')").order("created_on desc")
|
||||||
elsif params[:type] == "5" #用户资源
|
elsif params[:type] == "5" #用户资源
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal'").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal'").order("created_on desc")
|
||||||
|
elsif params[:type] == "6" #公共资源
|
||||||
|
Attachment.where("(is_public =1 and is_publish = 1 and container_id is not null)" + "or (author_id = #{params[:id]} and is_publish = 0)").order("created_on desc")
|
||||||
end
|
end
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@limit = 7
|
@limit = 7
|
||||||
|
@ -729,6 +731,8 @@ class UsersController < ApplicationController
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Project','Issue','Document','Message','News','StudentWorkScore','HomewCommon') and (filename like '%#{search}%')").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Project','Issue','Document','Message','News','StudentWorkScore','HomewCommon') and (filename like '%#{search}%')").order("created_on desc")
|
||||||
elsif params[:type] == "5" #用户资源
|
elsif params[:type] == "5" #用户资源
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal' and (filename like '%#{search}%')").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal' and (filename like '%#{search}%')").order("created_on desc")
|
||||||
|
elsif params[:type] == "6" #公共资源
|
||||||
|
@attachments = Attachment.where("(is_public =1 and is_publish = 1 and container_id is not null)" + "or (author_id = #{params[:id]} and is_publish = 0)").order("created_on desc")
|
||||||
end
|
end
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@limit = 7
|
@limit = 7
|
||||||
|
@ -1445,6 +1449,8 @@ class UsersController < ApplicationController
|
||||||
else
|
else
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type ='Principal'").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type ='Principal'").order("created_on desc")
|
||||||
end
|
end
|
||||||
|
elsif params[:type] == "6" # 公共资源
|
||||||
|
@attachments = Attachment.where("(is_public =1 and is_publish = 1 and container_id is not null)" + "or (author_id = #{params[:id]} and is_publish = 0)").order("created_on desc")
|
||||||
end
|
end
|
||||||
@type = params[:type] || 1
|
@type = params[:type] || 1
|
||||||
@limit = 25
|
@limit = 25
|
||||||
|
@ -2171,51 +2177,30 @@ class UsersController < ApplicationController
|
||||||
|
|
||||||
# 资源库 分为全部 课程资源 项目资源 附件
|
# 资源库 分为全部 课程资源 项目资源 附件
|
||||||
def user_resource
|
def user_resource
|
||||||
#确定container_type
|
|
||||||
# @user = User.find(params[:id])
|
|
||||||
# 别人的资源库是没有权限去看的
|
# 别人的资源库是没有权限去看的
|
||||||
if User.current.id.to_i != params[:id].to_i
|
if User.current.id.to_i != params[:id].to_i
|
||||||
render_403
|
render_403
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if(params[:type].blank? || params[:type] == "1") #全部
|
|
||||||
if User.current.id.to_i == params[:id].to_i
|
|
||||||
user_course_ids = User.current.courses.map { |c| c.id} #我的资源库的话,那么应该是我上传的所有资源 加上 我加入的课程的所有资源
|
|
||||||
@attachments = Attachment.where("(author_id = #{params[:id]} and is_publish = 1 and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
|
|
||||||
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1)").order("created_on desc")
|
|
||||||
else
|
|
||||||
user_course_ids = User.find(params[:id]).courses.visible.map { |c| c.id} #Ta的资源库的话,应该是他上传的公开资源 加上 他加入的所有我可见课程里的公开资源
|
|
||||||
@attachments = Attachment.where("(author_id = #{params[:id]} and is_public = 1 and is_publish = 1 " +
|
|
||||||
"and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) " +
|
|
||||||
"or (container_type = 'Course' and is_public = 1 and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1)").order("created_on desc")
|
|
||||||
end
|
|
||||||
elsif params[:type] == "2" #课程资源
|
|
||||||
if User.current.id.to_i == params[:id].to_i
|
|
||||||
user_course_ids = User.current.courses.map { |c| c.id}
|
user_course_ids = User.current.courses.map { |c| c.id}
|
||||||
|
user_project_ids = User.current.projects.map {|p| p.id}
|
||||||
|
# user_org_ids = User.current.projects.map {|p| p.id}
|
||||||
|
if(params[:type].blank? || params[:type] == "1") # 我的资源
|
||||||
|
# 修正:我的资源库的话,那么应该是我上传的所有资源加上,我加入的课程、项目、组织的所有资源
|
||||||
|
@attachments = Attachment.where("(author_id = #{params[:id]} and is_publish = 1 and container_type in('Project','OrgSubfield','Principal','Course','Issue','Document','Message','News','StudentWorkScore','HomewCommon')) "+
|
||||||
|
"or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1)" +
|
||||||
|
"or (container_type = 'Project' and container_id in (#{user_project_ids.empty? ? '0': user_project_ids.join(',')}) and is_publish = 1)" ).order("created_on desc")
|
||||||
|
elsif params[:type] == "2" # 课程资源
|
||||||
@attachments = Attachment.where("(author_id = #{params[:id]} and container_type = 'Course' and is_publish = 1) or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1) ").order("created_on desc")
|
@attachments = Attachment.where("(author_id = #{params[:id]} and container_type = 'Course' and is_publish = 1) or (container_type = 'Course' and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}) and is_publish = 1) ").order("created_on desc")
|
||||||
else
|
|
||||||
user_course_ids = User.find(params[:id]).courses.visible.map { |c| c.id} #如果课程私有资源,那么要看这个资源的课程是不是在 这个user的所有我可见的课程中
|
|
||||||
@attachments = Attachment.where("(author_id = #{params[:id]} and is_public = 1 and container_type = 'Course' and is_publish = 1)"+
|
|
||||||
"or (container_type = 'Course' and is_public = 1 and is_publish = 1 and container_id in (#{user_course_ids.empty? ? '0': user_course_ids.join(',')}))").order("created_on desc")
|
|
||||||
end
|
|
||||||
elsif params[:type] == "3" # 项目资源
|
elsif params[:type] == "3" # 项目资源
|
||||||
if User.current.id.to_i == params[:id].to_i
|
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Project'").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Project'").order("created_on desc")
|
||||||
else
|
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type = 'Project' ").order("created_on desc")
|
|
||||||
end
|
|
||||||
elsif params[:type] == "4" #附件
|
elsif params[:type] == "4" #附件
|
||||||
if User.current.id.to_i == params[:id].to_i
|
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal')").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal')").order("created_on desc")
|
||||||
else
|
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type in('Issue','Document','Message','News','StudentWorkScore','HomewCommon','OrgSubfield','Principal')").order("created_on desc")
|
|
||||||
end
|
|
||||||
elsif params[:type] == "5" #用户资源
|
elsif params[:type] == "5" #用户资源
|
||||||
if User.current.id.to_i == params[:id].to_i
|
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal'").order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and container_type = 'Principal'").order("created_on desc")
|
||||||
else
|
elsif params[:type] == "6" # 公共资源
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type = 'Principal'").order("created_on desc")
|
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||||
end
|
@attachments = Attachment.where(" ").order("created_on desc")
|
||||||
end
|
end
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@limit = 25
|
@limit = 25
|
||||||
|
@ -2227,7 +2212,7 @@ class UsersController < ApplicationController
|
||||||
@attachments = paginateHelper @attachments,25
|
@attachments = paginateHelper @attachments,25
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
format.html {render :layout => 'new_base_user'}
|
format.html {render :layout => 'new_base'}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2274,6 +2259,10 @@ class UsersController < ApplicationController
|
||||||
else
|
else
|
||||||
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type = 'Principal' and (filename like :p)",:p=>search).order("created_on desc")
|
@attachments = Attachment.where("author_id = #{params[:id]} and is_public = 1 and container_type = 'Principal' and (filename like :p)",:p=>search).order("created_on desc")
|
||||||
end
|
end
|
||||||
|
elsif params[:type] == "6" #全部资源
|
||||||
|
# 公共资源库:所有公开资源或者我上传的私有资源
|
||||||
|
@attachments = Attachment.where("((is_public =1 and is_publish = 1 and container_id is not null)" +
|
||||||
|
"or (author_id = #{params[:id]} and is_publish = 0)) and (filename like :p) ", :p => search).order("created_on desc")
|
||||||
end
|
end
|
||||||
@type = params[:type]
|
@type = params[:type]
|
||||||
@limit = 25
|
@limit = 25
|
||||||
|
|
|
@ -54,6 +54,59 @@ module UsersHelper
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def get_resource_origin attach
|
||||||
|
type = attach.container_type
|
||||||
|
content = attach.container
|
||||||
|
case type
|
||||||
|
when 'Course'
|
||||||
|
result = current_time_and_term_resource content
|
||||||
|
when 'Project'
|
||||||
|
result = content.name
|
||||||
|
when 'Issue'
|
||||||
|
result = content.subject
|
||||||
|
when 'Message'
|
||||||
|
result = content.subject
|
||||||
|
when 'News'
|
||||||
|
result = content.title
|
||||||
|
when 'HomewCommon'
|
||||||
|
result = content.name
|
||||||
|
when 'StudentWorkScore'
|
||||||
|
result = content.name
|
||||||
|
when 'Principal'
|
||||||
|
result = content.name
|
||||||
|
when 'OrgSubfield'
|
||||||
|
result = content.name
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def current_time_and_term_resource course
|
||||||
|
str = ""
|
||||||
|
term = cur_course_term_resource
|
||||||
|
name = course.name
|
||||||
|
if (course.time == course.end_time && course.term == course.end_term) || (course.end_term.nil? && course.end_time.nil?) || course.time > Time.now.year
|
||||||
|
str = name + "(" + course.time.to_s + course.term.to_s + ")"
|
||||||
|
elsif course.time == Time.now.year && set_term_value(cur_course_term) <= set_term_value(course.term)
|
||||||
|
str = name + "(" + course.time.to_s + course.term.to_s + ")"
|
||||||
|
elsif course.end_time < Time.now.year || (course.end_time == Time.now.year && set_term_value(cur_course_term) >= set_term_value(course.term))
|
||||||
|
str = name + "(" + course.end_time.to_s + course.end_term.to_s + ")"
|
||||||
|
else
|
||||||
|
str = name + "(" + Time.now.year.to_s + cur_course_term_resource.to_s + ")"
|
||||||
|
end
|
||||||
|
str
|
||||||
|
end
|
||||||
|
|
||||||
|
def cur_course_term_resource
|
||||||
|
month = Time.now.month
|
||||||
|
if month >= 9 || month < 2
|
||||||
|
term = "秋"
|
||||||
|
elsif (month >= 7 && Time.now.day >= 15) || month == 8
|
||||||
|
term = "夏"
|
||||||
|
else
|
||||||
|
term = "春"
|
||||||
|
end
|
||||||
|
term
|
||||||
|
end
|
||||||
|
|
||||||
def title_for_message type
|
def title_for_message type
|
||||||
case type
|
case type
|
||||||
when nil
|
when nil
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<%= form_tag( url_for(:controller => 'users', :action => 'resource_search', :id => user.id),
|
<%= form_tag( url_for(:controller => 'users', :action => 'resource_search', :id => user.id),
|
||||||
:remote=>true ,:method => 'get',:class=>'resourcesSearchloadBox',:id=>'resource_search_form') do %>
|
:remote => true , :method => 'get', :class => 'resourcesSearchloadBox mt10', :id => 'resource_search_form') do %>
|
||||||
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="searchResource" />
|
<input type="text" name="search" placeholder="输入资源关键词进行搜索" class="searchResource" />
|
||||||
<%= hidden_field_tag(:type,type.nil? ? 1 : type) %>
|
<%= hidden_field_tag(:type,type.nil? ? 1 : type) %>
|
||||||
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none' %>
|
<%= submit_tag '', :class => 'homepageSearchIcon', :onfocus => 'this.blur();', :style => 'border-style:none' %>
|
||||||
|
|
|
@ -1,27 +1,28 @@
|
||||||
|
|
||||||
<% if attachments.nil? || attachments.empty? %>
|
<% if attachments.nil? || attachments.empty? %>
|
||||||
<!--<p class="nodata">-->
|
<!--<p class="nodata">-->
|
||||||
<!--<%#= l(:label_no_data) %>-->
|
<!--<%#= l(:label_no_data) %>-->
|
||||||
<!--</p>-->
|
<!--</p>-->
|
||||||
<% else %>
|
<% else %>
|
||||||
<% attachments.each do |attach| %>
|
<% attachments.each do |attach| %>
|
||||||
<ul class="resourcesList" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
|
<ul class="resource-list" onmouseover="if($('#contextMenu').css('display') != 'block')$(this).children().css('background-color', '#e1e1e1')" onmouseout=" if($('#contextMenu').css('display') == 'none')$(this).children().css('background-color', 'white')">
|
||||||
<li class="resourcesListCheckbox fl">
|
<li class="resource-list-checkbox fl">
|
||||||
<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="resourcesCheckbox" />
|
<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="resourcesCheckbox" />
|
||||||
|
<!--<input name="checkbox2" type="checkbox" value="" class="resourcesCheckbox" />-->
|
||||||
</li>
|
</li>
|
||||||
<li class="resourcesListName fl">
|
<li class="resource-list-name fl hidden">
|
||||||
<!--<a href="javascript:void(0);" class="resourcesBlack"><%#=truncate(attach.filename,:length=>18)%></a>-->
|
<%= link_to truncate(attach.filename, :length => 30), download_named_attachment_path(attach.id, attach.filename), :title => attach.filename, :class => 'resourcesBlack' %>
|
||||||
<%= link_to truncate(attach.filename,:length=>30), download_named_attachment_path(attach.id, attach.filename),
|
|
||||||
:title => attach.filename,:class=>'resourcesBlack'%>
|
|
||||||
</li>
|
</li>
|
||||||
<li class="resourcesListSize fl"><%= number_to_human_size(attach.filesize) %></li>
|
<li class="resource-list-time fr"><%= format_date(attach.created_on) %></li>
|
||||||
<li class="resourcesListType fl"><%= get_resource_type(attach.container_type)%></li>
|
<li style="display: none"><%= attach.id %></li>
|
||||||
<li class="resourcesListUploader fl"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
<li class="resource-list-uploader fr hidden"><%=User.find(attach.author_id).realname.blank? ? User.find(attach.author_id).nickname : User.find(attach.author_id).realname %></li>
|
||||||
<li style="display: none"><%= attach.author_id %></li>
|
<li style="display: none"><%= attach.author_id %></li>
|
||||||
<li class="resourcesListTime fl"><%= format_date(attach.created_on) %></li>
|
<li class="resource-list-type fr"><%= get_resource_type(attach.container_type)%></li>
|
||||||
|
<li style="display: none"><%= attach.id %></li>
|
||||||
|
<li class="resource-list-size fr"><%= number_to_human_size(attach.filesize) %></li>
|
||||||
|
<li style="display: none"><%= attach.id %></li>
|
||||||
|
<li class="resource-list-from fr hidden" title="<%= get_resource_origin(attach) %>"><%= get_resource_origin(attach) %></li>
|
||||||
<li style="display: none"><%= attach.id %></li>
|
<li style="display: none"><%= attach.id %></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="resourcesListDashLine"></ul>
|
<div class="cl"></div>
|
||||||
|
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
<%= javascript_include_tag 'bootstrap'%>
|
<%= javascript_include_tag 'bootstrap'%>
|
||||||
<%= stylesheet_link_tag 'project' %>
|
<%= stylesheet_link_tag 'project' %>
|
||||||
<%= stylesheet_link_tag 'leftside' %>
|
<%= stylesheet_link_tag 'leftside' %>
|
||||||
|
@ -12,6 +11,12 @@
|
||||||
function remote_get_resources(user_id,type){
|
function remote_get_resources(user_id,type){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
$(document).ready(function(){
|
||||||
|
$(".resource-switch").click(function(){
|
||||||
|
$(".resource-switch").children().removeClass("resource-tab-active");
|
||||||
|
$(this).children().addClass("resource-tab-active");
|
||||||
|
});
|
||||||
|
});
|
||||||
function remote_search(){
|
function remote_search(){
|
||||||
$("#resource_search_form").submit();
|
$("#resource_search_form").submit();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +26,7 @@
|
||||||
showModal('ajax-modal', '452px');
|
showModal('ajax-modal', '452px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
$('#ajax-modal').before("<a href='javascript:void(0)' onclick='closeModal();' style='margin-left: 435px;' class='resourceClose'></a>");
|
||||||
$('#ajax-modal').parent().css("top","50%").css("left","50%");
|
$('#ajax-modal').parent().css("top","50%").css("left","50%").css("position","absolute");
|
||||||
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
$('#ajax-modal').parent().addClass("resourceUploadPopup");
|
||||||
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
|
||||||
}
|
}
|
||||||
|
@ -56,8 +61,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<div class="homepageRightBanner">
|
|
||||||
<div class="NewsBannerName">资源库</div>
|
<div class="homepageContentContainer" >
|
||||||
|
<div class="homepageContent">
|
||||||
|
<div class="resource-wrapper">
|
||||||
|
<ul class="resource-banner">
|
||||||
|
<li class="fl resource-switch"><a href="javascript:void(0);" class="resource-tab resource-tab-active">公共资源</a></li>
|
||||||
|
<li class="fl resource-switch"><%=link_to "我的资源", {:controller => 'users', :action => 'user_resource', :id => User.current.id, :type => 1, :remote => true}, :class => "resource-tab" %></li>
|
||||||
|
<li class="fl w770 border-bottom h34"> </li>
|
||||||
|
<li class="fr resource-banner-li border-bottom h34">
|
||||||
<ul class="resourcesSelect">
|
<ul class="resourcesSelect">
|
||||||
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
<li class="resourcesSelected"><a href="javascript:void(0);" class="resourcesIcon"></a>
|
||||||
<ul class="resourcesType">
|
<ul class="resourcesType">
|
||||||
|
@ -79,44 +91,39 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</li>
|
||||||
|
<div class="cl"></div>
|
||||||
<div class="resources mt10" id="users_setting">
|
</ul>
|
||||||
<div class="resourcesSearchBanner mt10">
|
<div class="cl"></div>
|
||||||
<div class="resourcesUploadBox">
|
<div id="users_setting">
|
||||||
<a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a></div>
|
<div class="resourcesUploadBox mt10"><a href="javascript:void(0);" onclick="show_upload();" class="uploadBoxIcon">上传资源</a></div>
|
||||||
<div id="search_div">
|
<div id="search_div">
|
||||||
<%= render :partial => 'resource_search_form',:locals => {:user => @user, :type => @type} %>
|
<%= render :partial => 'resource_search_form',:locals => {:user => @user, :type => @type} %>
|
||||||
</div>
|
</div>
|
||||||
<div style="
|
<div style="float: left; margin-top: 7px; font-size: 14px; margin-left: 15px;"><span style="align:center ;font-size: 14px;color: gray;">为您找到<span id="res_all_count"><%= @atta_count %></span>个资源</span></div>
|
||||||
float: left;
|
|
||||||
margin-top: 7px;
|
|
||||||
font-size: 14px;
|
|
||||||
margin-left: 15px;
|
|
||||||
"><span style="align:center ;font-size: 14px;color: gray;">为您找到<span id="res_all_count"><%= @atta_count%></span>个资源</span></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="resourcesListBanner">
|
<div class="cl"></div>
|
||||||
<ul class="resourcesListTab">
|
<ul class="resource-list-tab mt10">
|
||||||
<li class="resourcesListCheckbox fl"> </li>
|
<li class="resource-list-checkbox fl"> </li>
|
||||||
<li class="resourcesListName fl">资源名称</li>
|
<li class="resource-list-name fl">资源名称</li>
|
||||||
<li class="resourcesListSize fl">大小</li>
|
<li class="resource-list-time fr">上传时间</li>
|
||||||
<li class="resourcesListType fl">类别</li>
|
<li class="resource-list-uploader fr">上传者</li>
|
||||||
<li class="resourcesListUploader fl">上传者</li>
|
<li class="resource-list-type fr">类别</li>
|
||||||
<li class="resourcesListTime fl">上传时间</li>
|
<li class="resource-list-size fr">大小</li>
|
||||||
|
<li class="resource-list-from fr">资源来源</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
<div class="cl"></div>
|
||||||
<form id="resources_list_form">
|
<form id="resources_list_form">
|
||||||
<div id="resources_list">
|
<div id="resources_list">
|
||||||
|
|
||||||
<%= render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments} %>
|
<%= render :partial => 'resources_list' ,:locals=>{ :attachments => @attachments} %>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="resourcesListOption">
|
<div class="cl"></div>
|
||||||
<div class="resourcesCheckAll">
|
<div class="resource-list-option fl">
|
||||||
|
<div class="resource-check-all">
|
||||||
<input id="checkboxAll" type="checkbox" value="" onclick="all_select();" class="resourcesCheckbox" />
|
<input id="checkboxAll" type="checkbox" value="" onclick="all_select();" class="resourcesCheckbox" />
|
||||||
</div>
|
</div>
|
||||||
<a href="javascript:void(0);" class="replyGrey1 mr15" onclick="all_select();">全选</a>
|
<a href="javascript:void(0);" class="replyGrey1 mr15" onclick="all_select();">全选</a>
|
||||||
<a href="javascript:void(0);" class="replyGrey1" onclick="batch_delete();">删除</a>
|
<a href="javascript:void(0);" class="replyGrey" onclick="batch_delete();">删除</a>
|
||||||
<div class="resourcesSelectSend">
|
<div class="resourcesSelectSend">
|
||||||
<div class="fl">选择 <span class="c_red" id="res_count">0</span> 个资源</div>
|
<div class="fl">选择 <span class="c_red" id="res_count">0</span> 个资源</div>
|
||||||
<div class="resourcesSelectSendButton" onclick="batch_send();">
|
<div class="resourcesSelectSendButton" onclick="batch_send();">
|
||||||
|
@ -132,11 +139,13 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<!--<div id="upload_box" style="display: none">-->
|
<!--<div id="upload_box" style="display: none">-->
|
||||||
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
|
<!--<%#= render :partial => 'upload_resource' ,:locals => {:user=>@user}%>-->
|
||||||
<!--</div>-->
|
<!--</div>-->
|
||||||
|
<ul class="resource-list">
|
||||||
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu">
|
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu" id="contextMenu">
|
||||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li>
|
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)preview();" onfocus="this.blur()">预览</a></li>
|
||||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li>
|
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)rename();" onfocus="this.blur()">重命名</a></li>
|
||||||
|
@ -144,7 +153,7 @@
|
||||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)show_send_();" data-remote="true" onfocus="this.blur()" >发送</a></li>
|
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)show_send_();" data-remote="true" onfocus="this.blur()" >发送</a></li>
|
||||||
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)delete_file();" onfocus="this.blur()">删除</a></li>
|
<li><a tabindex="-1" href="#" onclick="if(<%= User.current.logged?%>)delete_file();" onfocus="this.blur()">删除</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</ul>
|
||||||
<script>
|
<script>
|
||||||
var pageX = 0;
|
var pageX = 0;
|
||||||
var pageY = 0;
|
var pageY = 0;
|
||||||
|
|
|
@ -167,6 +167,7 @@ h4{ font-size:14px; color:#3b3b3b;}
|
||||||
.w610{ width:610px;}
|
.w610{ width:610px;}
|
||||||
.w600{ width:600px !important;}
|
.w600{ width:600px !important;}
|
||||||
.w606{ width:606px }
|
.w606{ width:606px }
|
||||||
|
.w770{ width:770px;}
|
||||||
.h20{height: 20px;}
|
.h20{height: 20px;}
|
||||||
.h22{ height:22px;}
|
.h22{ height:22px;}
|
||||||
.h26{ height:26px;}
|
.h26{ height:26px;}
|
||||||
|
@ -1049,3 +1050,23 @@ a.chooseActive {background-color:#269ac9; color:#ffffff;}
|
||||||
|
|
||||||
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
.whiteSettingIcon {background:url(../images/hwork_icon.png) -5px -302px no-repeat; width:20px; height:20px;}
|
||||||
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
.whiteSettingIcon:hover {background:url(../images/homepage_icon.png) -93px -44px no-repeat;}
|
||||||
|
|
||||||
|
/*20160226新资源库*/
|
||||||
|
.resource-wrapper {width:980px; background-color:#fff; float:left;}
|
||||||
|
.resource-list-tab {width:980px; height:40px; background-color:#f6f6f6; border-bottom:1px solid #eaeaea; font-size:14px; color:#7a7a7a;}
|
||||||
|
.resource-list-checkbox {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle;}
|
||||||
|
.resource-checkbox {margin-top:14px; width:12px; height:12px;}
|
||||||
|
.resource-list-name {width:440px; height:40px; line-height:40px; text-align:left;}
|
||||||
|
.resource-list-from {width:100px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-size {width:100px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-type {width:100px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-uploader {width:100px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list-time {width:100px; height:40px; line-height:40px; text-align:center;}
|
||||||
|
.resource-list {width:980px; height:39px; background-color:#ffffff; border-bottom:1px dashed #eaeaea; color:#9a9a9a; font-size:12px; margin-left:auto; margin-right:auto; cursor:pointer;}
|
||||||
|
.resource-list:hover {background-color:#e1e1e1;}
|
||||||
|
.resource-list-option {width:980px; height:40px; line-height:40px; vertical-align:middle; margin-left:auto; margin-right:auto; background-color:#f6f6f6;}
|
||||||
|
.resource-check-all {width:20px; height:40px; line-height:40px; text-align:center; vertical-align:middle; float:left;}
|
||||||
|
.border-bottom {border-bottom:1px solid #ddd;}
|
||||||
|
.h34 {height:34px;}
|
||||||
|
.resource-tab {font-size:16px; color:#4d4d4d; width:70px; padding:5px 10px; display:inline-block; text-align:left; border-bottom:1px solid #ddd;}
|
||||||
|
a.resource-tab-active {color:#fff; background-color:#269ac9; border-bottom:1px solid #269ac9;}
|
||||||
|
|
Loading…
Reference in New Issue