Changes project selection boxes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/work@2277 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-17 13:07:40 +00:00
parent 79c7fc6303
commit 4c7e1629a3
3 changed files with 15 additions and 16 deletions
+1 -8
View File
@@ -27,14 +27,7 @@ module UsersHelper
# Options for the new membership projects combo-box
def projects_options_for_select(projects)
options = content_tag('option', "--- #{l(:actionview_instancetag_blank_option)} ---")
projects_by_root = projects.group_by(&:root)
projects_by_root.keys.sort.each do |root|
options << content_tag('option', h(root.name), :value => root.id, :disabled => (!projects.include?(root)))
projects_by_root[root].sort.each do |project|
next if project == root
options << content_tag('option', '&#187; ' + h(project.name), :value => project.id)
end
end
options << project_tree_options_for_select(projects)
options
end