|
|
@ -77,16 +77,18 @@ class FilesController < ApplicationController
|
|
|
|
if params[:insite]
|
|
|
|
if params[:insite]
|
|
|
|
if q == "%%"
|
|
|
|
if q == "%%"
|
|
|
|
@result = []
|
|
|
|
@result = []
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
# @searched_attach = paginateHelper @result,10
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@result = find_public_attache q,sort
|
|
|
|
@result = find_public_attache q,sort
|
|
|
|
@result = visable_attachemnts_insite @result,@course
|
|
|
|
@result = visable_attachemnts_insite @result,@course
|
|
|
|
@searched_attach = paginateHelper @result,10
|
|
|
|
# @searched_attach = paginateHelper @result,10
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@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
|
|
|
|
|
|
|
|
@tag_list = get_course_tag_list @course
|
|
|
|
|
|
|
|
end
|
|
|
|
@all_attachments = @result
|
|
|
|
@all_attachments = @result
|
|
|
|
@limit = 10
|
|
|
|
@limit = 10
|
|
|
|
@feedback_count = @all_attachments.count
|
|
|
|
@feedback_count = @all_attachments.count
|
|
|
@ -94,11 +96,6 @@ class FilesController < ApplicationController
|
|
|
|
@offset ||= @feedback_pages.offset
|
|
|
|
@offset ||= @feedback_pages.offset
|
|
|
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
|
|
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
|
|
|
@obj_attachments = paginateHelper @all_attachments,10
|
|
|
|
@obj_attachments = paginateHelper @all_attachments,10
|
|
|
|
|
|
|
|
|
|
|
|
# @searched_attach = paginateHelper @result,10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@tag_list = get_course_tag_list @course
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
#rescue Exception => e
|
|
|
|
#rescue Exception => e
|
|
|
|
# #render 'stores'
|
|
|
|
# #render 'stores'
|
|
|
|
# redirect_to search_course_files_url
|
|
|
|
# redirect_to search_course_files_url
|
|
|
@ -153,18 +150,26 @@ class FilesController < ApplicationController
|
|
|
|
if params[:insite]
|
|
|
|
if params[:insite]
|
|
|
|
if q == "%%"
|
|
|
|
if q == "%%"
|
|
|
|
@project_attachment_result = []
|
|
|
|
@project_attachment_result = []
|
|
|
|
@searched_attach = paginateHelper @project_attachment_result, 10
|
|
|
|
# @searched_attach = paginateHelper @project_attachment_result, 10
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@project_attachment_result = find_public_attache q,sort
|
|
|
|
@project_attachment_result = find_public_attache q,sort
|
|
|
|
@project_attachment_result = visable_attachemnts_insite @project_attachment_result, @project
|
|
|
|
@project_attachment_result = visable_attachemnts_insite @project_attachment_result, @project
|
|
|
|
@searched_attach = paginateHelper @project_attachment_result, 10
|
|
|
|
# @searched_attach = paginateHelper @project_attachment_result, 10
|
|
|
|
end
|
|
|
|
end
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@project_attachment_result = find_project_attache q, @project,sort
|
|
|
|
@project_attachment_result = find_project_attache q, @project,sort
|
|
|
|
@project_attachment_result = visable_attachemnts @project_attachment_result
|
|
|
|
@project_attachment_result = visable_attachemnts @project_attachment_result
|
|
|
|
@searched_attach = paginateHelper @project_attachment_result,10
|
|
|
|
# @searched_attach = paginateHelper @project_attachment_result,10
|
|
|
|
@tag_list = get_project_tag_list @project
|
|
|
|
@tag_list = get_project_tag_list @project
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@all_attachments = @project_attachment_result
|
|
|
|
|
|
|
|
@limit = 10
|
|
|
|
|
|
|
|
@feedback_count = @all_attachments.count
|
|
|
|
|
|
|
|
@feedback_pages = Paginator.new @feedback_count, @limit, params['page']
|
|
|
|
|
|
|
|
@offset ||= @feedback_pages.offset
|
|
|
|
|
|
|
|
#@curse_attachments_all = @all_attachments[@offset, @limit]
|
|
|
|
|
|
|
|
@obj_attachments = paginateHelper @all_attachments,10
|
|
|
|
#rescue Exception => e
|
|
|
|
#rescue Exception => e
|
|
|
|
# #render 'stores'
|
|
|
|
# #render 'stores'
|
|
|
|
# redirect_to search_course_files_url
|
|
|
|
# redirect_to search_course_files_url
|
|
|
|