|
|
@ -325,6 +325,7 @@ class FilesController < ApplicationController
|
|
|
|
@containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)]
|
|
|
|
@containers = [ Project.includes(:attachments).reorder(sort).find(@project.id)]
|
|
|
|
|
|
|
|
|
|
|
|
show_attachments @containers
|
|
|
|
show_attachments @containers
|
|
|
|
|
|
|
|
get_attachment_for_tip(@all_attachments)
|
|
|
|
|
|
|
|
|
|
|
|
@tag_list = attachment_tag_list @all_attachments
|
|
|
|
@tag_list = attachment_tag_list @all_attachments
|
|
|
|
|
|
|
|
|
|
|
@ -377,6 +378,7 @@ class FilesController < ApplicationController
|
|
|
|
@containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)]
|
|
|
|
@containers = [ Course.includes(:attachments).reorder(sort).find(@course.id)]
|
|
|
|
|
|
|
|
|
|
|
|
show_attachments @containers
|
|
|
|
show_attachments @containers
|
|
|
|
|
|
|
|
get_attachment_for_tip(@all_attachments)
|
|
|
|
|
|
|
|
|
|
|
|
@tag_list = attachment_tag_list @all_attachments
|
|
|
|
@tag_list = attachment_tag_list @all_attachments
|
|
|
|
|
|
|
|
|
|
|
@ -440,6 +442,13 @@ class FilesController < ApplicationController
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 获取提示中私有、公开总数信息
|
|
|
|
|
|
|
|
def get_attachment_for_tip all_attachment
|
|
|
|
|
|
|
|
@tip_all_attachments = all_attachment.count
|
|
|
|
|
|
|
|
@tip_all_public_attachments = all_attachment.select{|attach| attach.is_public == 1}.count
|
|
|
|
|
|
|
|
@tip_all_private_attachments = all_attachment.select{|attach| attach.is_public == 0}.count
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def quote_resource_show
|
|
|
|
def quote_resource_show
|
|
|
|
@file = Attachment.find(params[:id])
|
|
|
|
@file = Attachment.find(params[:id])
|
|
|
|
@can_quote = attachment_candown @file
|
|
|
|
@can_quote = attachment_candown @file
|
|
|
@ -883,6 +892,7 @@ class FilesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
@all_attachments = @result
|
|
|
|
@all_attachments = @result
|
|
|
|
|
|
|
|
get_attachment_for_tip(@all_attachments)
|
|
|
|
@limit = 10
|
|
|
|
@limit = 10
|
|
|
|
@feedback_count = @all_attachments.count
|
|
|
|
@feedback_count = @all_attachments.count
|
|
|
|
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
|
|
|
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
|
|
|