From 71c3ad642c1f7e2a15b9c7705db2aab5ab36ede0 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Wed, 12 Jul 2006 21:35:56 +0000 Subject: [PATCH] issues list bug fix git-svn-id: http://redmine.rubyforge.org/svn/trunk@10 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- redmine/app/helpers/search_filter_helper.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/redmine/app/helpers/search_filter_helper.rb b/redmine/app/helpers/search_filter_helper.rb index a5f0b9158..98b281225 100644 --- a/redmine/app/helpers/search_filter_helper.rb +++ b/redmine/app/helpers/search_filter_helper.rb @@ -29,6 +29,7 @@ module SearchFilterHelper end def search_filter_update + session[:search_filter] ||= {} @search_filter.each_key {|field| session[:search_filter][field] = params[field] } end @@ -46,7 +47,9 @@ module SearchFilterHelper end def search_filter_tag(criteria, options = {}) + session[:search_filter] ||= {} options[:name] = criteria + options[:class] += " active-filter" if session[:search_filter][criteria] and session[:search_filter][criteria] != @search_filter[criteria][:options][0][1] content_tag("select", options_for_select(@search_filter[criteria][:options], session[:search_filter][criteria]), options @@ -76,12 +79,18 @@ module SearchFilterHelper ] + @project.issue_categories.find(:all).collect {|s| [s.name, s.id, ["issues.category_id=?", s.id]] } } + search_filter_criteria('fixed_version_id') { + [ [_('[All]'), "A", nil], + [_('[None]'), "N", ["issues.fixed_version_id is null"]] + ] + @project.versions.collect {|s| [s.name, s.id, ["issues.fixed_version_id=?", s.id]] } + } + search_filter_criteria('assigned_to_id') { [ [_('[All]'), "A", nil], [_('[None]'), "N", ["issues.assigned_to_id is null"]] ] + @project.users.collect {|s| [s.display_name, s.id, ["issues.assigned_to_id=?", s.id]] } } - + search_filter_criteria('subproject_id') { [ [_('[None]'), "N", ["issues.project_id=?", @project.id]], [_('[All]'), "A", ["(issues.project_id=? or projects.parent_id=?)", @project.id, @project.id]]