From db2ab5b945b2b5ee08921dce73930782a3ea7273 Mon Sep 17 00:00:00 2001 From: kg Date: Thu, 8 May 2014 14:18:42 +0800 Subject: [PATCH] modify issue filter and base_footer --- app/models/issue_query.rb | 7 ++++++- app/models/query.rb | 8 +++++++- app/views/layouts/_base_footer.html.erb | 14 +++++++------- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/app/models/issue_query.rb b/app/models/issue_query.rb index 5b818cc28..f428c5d81 100644 --- a/app/models/issue_query.rb +++ b/app/models/issue_query.rb @@ -52,7 +52,12 @@ class IssueQuery < Query def initialize(attributes=nil, *args) super attributes - self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} } +# self.filters ||= { 'status_id' => {:operator => "o", :values => [""]} } + + #gcm + self.filters ||= { 'subject' => {:operator => "~" , :values => [""] } } + #gcmend + end # Returns true if the query is visible to +user+ or the current user. diff --git a/app/models/query.rb b/app/models/query.rb index db6ca07a5..550047c57 100644 --- a/app/models/query.rb +++ b/app/models/query.rb @@ -233,7 +233,13 @@ class Query < ActiveRecord::Base # filter requires one or more values (values_for(field) and !values_for(field).first.blank?) or # filter doesn't require any value - ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field) + ["o", "c", "!*", "*", "t", "ld", "w", "lw", "l2w", "m", "lm", "y"].include? operator_for(field) or + + #gcm + #subject could be null + (field.eql?"subject") + #gcmend + end if filters end diff --git a/app/views/layouts/_base_footer.html.erb b/app/views/layouts/_base_footer.html.erb index 9df56ee2f..ee7bcecf0 100644 --- a/app/views/layouts/_base_footer.html.erb +++ b/app/views/layouts/_base_footer.html.erb @@ -11,16 +11,16 @@ <%= link_to "国防科学技术大学并行与分布处理国家重点实验室","http://www.nudt.edu.cn/ArticleShow.asp?ID=47",:target=>"_blank"%> <%= link_to "计算机科学与技术系", "http://www.nudt.edu.cn/ArticleShow.asp?ID=41", :target => "_blank" %> 版权@2007~2014 - <%= link_to "联系我们","http://forge.trustie.net/projects/2/member",:target=>"_blank"%> - <%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/"%> + <%= link_to "联系我们","http://forge.trustie.net/projects/2/member", :target=>"_blank" %> + <%= link_to "湘ICP备09019772","http://www.miibeian.gov.cn/", :target => "_blank" %>