diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-18 16:15:22 +0000 |
commit | 073818f8bc46580e118a7550f1faaa55b3be13d9 (patch) | |
tree | 6ea9ab7a218ecdac7f4fba61f339e17d0459f04d /app/helpers/search_helper.rb | |
parent | 1907c31138d065aea93f53b8e7565e06a44e49f8 (diff) | |
download | redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.tar.gz redmine-073818f8bc46580e118a7550f1faaa55b3be13d9.zip |
Ability to search all projects or the projects the user belongs to (#791).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1435 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r-- | app/helpers/search_helper.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index ed2f40b69..6b5a2cede 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -35,4 +35,11 @@ module SearchHelper end result end + + def project_select_tag + options = [[l(:label_project_all), 'all']] + options << [l(:label_my_projects), 'my_projects'] unless User.current.memberships.empty? + options << [@project.name, ''] unless @project.nil? + select_tag('projects', options_for_select(options, params[:projects].to_s)) if options.size > 1 + end end |