Commit 2e2f79aa authored by Jean-Philippe Lang's avatar Jean-Philippe Lang Committed by Eric Davis

Save 2 queries when displaying a root issue.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5244 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent d022da5d
......@@ -57,11 +57,12 @@ module IssuesHelper
def render_issue_subject_with_tree(issue)
s = ''
issue.ancestors.each do |ancestor|
ancestors = issue.root? ? [] : issue.ancestors.all
ancestors.each do |ancestor|
s << '<div>' + content_tag('p', link_to_issue(ancestor))
end
s << '<div>' + content_tag('h3', h(issue.subject))
s << '</div>' * (issue.ancestors.size + 1)
s << '</div>' * (ancestors.size + 1)
s
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment