diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index c25bff049..c756168d1 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -203,7 +203,7 @@ module ApplicationHelper
if projects.any?
ancestors = []
original_project = @project
- projects.each do |project|
+ projects.sort_by(&:lft).each do |project|
# set the project environment to please macros.
@project = project
if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
@@ -302,30 +302,6 @@ module ApplicationHelper
Project.project_tree(projects, &block)
end
- def project_nested_ul(projects, &block)
- s = ''
- if projects.any?
- ancestors = []
- projects.sort_by(&:lft).each do |project|
- if (ancestors.empty? || project.is_descendant_of?(ancestors.last))
- s << "
\n"
- else
- ancestors.pop
- s << ""
- while (ancestors.any? && !project.is_descendant_of?(ancestors.last))
- ancestors.pop
- s << "
\n"
- end
- end
- s << ""
- s << yield(project).to_s
- ancestors << project
- end
- s << ("\n" * ancestors.size)
- end
- s.html_safe
- end
-
def principals_check_box_tags(name, principals)
s = ''
principals.sort.each do |principal|
diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb
index e8819f41d..9039bba68 100644
--- a/app/views/trackers/_form.html.erb
+++ b/app/views/trackers/_form.html.erb
@@ -42,7 +42,7 @@
<% if @projects.any? %>