diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-20 20:31:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-20 20:31:04 +0000 |
commit | b0be3b95aab8c01a7561431579c83cde07f3109f (patch) | |
tree | c1d102b7117176523e633e313526550acbcdd317 /app/controllers/search_controller.rb | |
parent | 94dbf641ffd7f479208b135b310585898058e20b (diff) | |
download | redmine-b0be3b95aab8c01a7561431579c83cde07f3109f.tar.gz redmine-b0be3b95aab8c01a7561431579c83cde07f3109f.zip |
Ability to search a project and its subprojects (#1264).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1439 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/search_controller.rb')
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index d93c63808..d4ef01bf8 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -30,11 +30,13 @@ class SearchController < ApplicationController @titles_only = !params[:titles_only].nil? projects_to_search = - case params[:projects] + case params[:scope] when 'all' nil when 'my_projects' User.current.memberships.collect(&:project) + when 'subprojects' + @project ? ([ @project ] + @project.active_children) : nil else @project end |