组织资源栏目,过滤条件“其他”内容

This commit is contained in:
ouyangxuhua 2016-03-07 16:14:44 +08:00
parent a0363b5511
commit 0df34dd3ee
1 changed files with 9 additions and 1 deletions

View File

@ -863,7 +863,15 @@ class FilesController < ApplicationController
q = "%#{@q.strip}%"
@result = find_org_subfield_attache q,@org_subfield,sort
@result = visable_attachemnts @result
if params[:other]
@result = @result.select{|attachment|
attachment.tag_list.exclude?('软件') &&
attachment.tag_list.exclude?('媒体') &&
attachment.tag_list.exclude?('代码')
}
else
@result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank?
end
@searched_attach = paginateHelper @result,10
@tag_list = get_org_subfield_tag_list @org_subfield