|
|
@ -79,7 +79,8 @@ class FilesController < ApplicationController
|
|
|
|
@result = find_course_attache q,@course,sort
|
|
|
|
@result = find_course_attache q,@course,sort
|
|
|
|
@result = visable_attachemnts @result
|
|
|
|
@result = visable_attachemnts @result
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
@tag_list = attachment_tag_list @result
|
|
|
|
|
|
|
|
|
|
|
|
@tag_list = get_course_tag_list @course
|
|
|
|
end
|
|
|
|
end
|
|
|
|
#rescue Exception => e
|
|
|
|
#rescue Exception => e
|
|
|
|
# #render 'stores'
|
|
|
|
# #render 'stores'
|
|
|
@ -387,6 +388,7 @@ class FilesController < ApplicationController
|
|
|
|
@containers = [Course.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@course.id)]
|
|
|
|
@containers = [Course.includes(:attachments).reorder("#{Attachment.table_name}.created_on DESC").find(@course.id)]
|
|
|
|
|
|
|
|
|
|
|
|
show_attachments @containers
|
|
|
|
show_attachments @containers
|
|
|
|
|
|
|
|
@tag_list = attachment_tag_list @all_attachments
|
|
|
|
|
|
|
|
|
|
|
|
@attachtype = 0
|
|
|
|
@attachtype = 0
|
|
|
|
@contenttype = 0
|
|
|
|
@contenttype = 0
|
|
|
@ -522,7 +524,7 @@ class FilesController < ApplicationController
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
#查找指定TAG的按条件过滤的资源列表
|
|
|
|
#查找指定TAG的按条件过滤的资源列表,只有课程内搜索有此功能
|
|
|
|
def search_tag_attachment
|
|
|
|
def search_tag_attachment
|
|
|
|
@q,@tag_name,@order = params[:q],params[:tag_name]
|
|
|
|
@q,@tag_name,@order = params[:q],params[:tag_name]
|
|
|
|
@is_remote = true
|
|
|
|
@is_remote = true
|
|
|
@ -540,7 +542,7 @@ class FilesController < ApplicationController
|
|
|
|
@result = visable_attachemnts @result
|
|
|
|
@result = visable_attachemnts @result
|
|
|
|
@result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)}
|
|
|
|
@result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)}
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
@tag_list = attachment_tag_list @result
|
|
|
|
@tag_list = get_course_tag_list @course
|
|
|
|
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.js
|
|
|
|
format.js
|
|
|
|