Adds a <<me>> option at the top of the assignee drop-down (#1102).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8688 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2012-01-21 11:06:59 +00:00
1 parent 1d07bb91a7
commit 45e3dafa8f
2 files changed
+12

No files matched your search

+3
View File
@@ -305,6 +305,9 @@ module ApplicationHelper
# Returns a string for users/groups option tags
def principals_options_for_select(collection, selected=nil)
s = ''
if collection.include?(User.current)
s << content_tag('option', "<< #{l(:label_me)} >>", :value => User.current.id)
end
groups = ''
collection.sort.each do |element|
selected_attribute = ' selected="selected"' if option_value_selected?(element, selected)