summaryrefslogtreecommitdiffstats
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb7
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