Ability to search a project and its subprojects (#1264).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1439 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-05-20 20:31:04 +00:00
parent 94dbf641ff
commit b0be3b95aa
29 changed files with 39 additions and 2 deletions
+3 -1
View File
@@ -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