diff --git a/app/helpers/admin_helper.rb b/app/helpers/admin_helper.rb index b49a5674cc..8f81f66ba7 100644 --- a/app/helpers/admin_helper.rb +++ b/app/helpers/admin_helper.rb @@ -20,12 +20,4 @@ module AdminHelper options_for_select([[l(:label_all), ''], [l(:status_active), 1]], selected) end - - def css_project_classes(project) - s = 'project' - s << ' root' if project.root? - s << ' child' if project.child? - s << (project.leaf? ? ' leaf' : ' parent') - s - end end diff --git a/app/models/project.rb b/app/models/project.rb index 5ef7915def..40898a34eb 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -413,6 +413,14 @@ class Project < ActiveRecord::Base description.gsub(/^(.{#{length}}[^\n\r]*).*$/m, '\1...').strip if description end + def css_classes + s = 'project' + s << ' root' if root? + s << ' child' if child? + s << (leaf? ? ' leaf' : ' parent') + s + end + # The earliest start date of a project, based on it's issues and versions def start_date if module_enabled?(:issue_tracking) diff --git a/app/views/admin/projects.rhtml b/app/views/admin/projects.rhtml index 6cf933d110..47a2d05833 100644 --- a/app/views/admin/projects.rhtml +++ b/app/views/admin/projects.rhtml @@ -26,7 +26,7 @@
<% project_tree(@projects) do |project, level| %> -