From 0df34dd3ee16bf3dbe60c72be3d93e7690d8ebf7 Mon Sep 17 00:00:00 2001 From: ouyangxuhua Date: Mon, 7 Mar 2016 16:14:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E8=B5=84=E6=BA=90=E6=A0=8F?= =?UTF-8?q?=E7=9B=AE=EF=BC=8C=E8=BF=87=E6=BB=A4=E6=9D=A1=E4=BB=B6=E2=80=9C?= =?UTF-8?q?=E5=85=B6=E4=BB=96=E2=80=9D=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/files_controller.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index 5ad93f8db..57cadc10b 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -863,7 +863,15 @@ class FilesController < ApplicationController q = "%#{@q.strip}%" @result = find_org_subfield_attache q,@org_subfield,sort @result = visable_attachemnts @result - @result = @result.select{|attachment| attachment.tag_list.include?(@tag_name)} unless @tag_name.blank? + 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