Project

General

Profile

Patch #15153 ยป subtask-details.patch

Daniel Ritz, 2013-10-18 13:46

View differences:

app/helpers/issues_helper.rb
end
def render_descendants_tree(issue)
show_start = !issue.disabled_core_fields.include?('start_date') && !issue.start_date.nil?
show_due = !issue.disabled_core_fields.include?('due_date') && !issue.due_date.nil?
show_estimated = !issue.disabled_core_fields.include?('estimated_hours') && !issue.estimated_hours.nil?
show_spent = User.current.allowed_to?(:view_time_entries, @project)
s = '<form><table class="list issues">'
issue_list(issue.descendants.visible.sort_by(&:lft)) do |child, level|
start_date = ''
if show_start
if !child.disabled_core_fields.include?('start_date') && !child.start_date.nil?
start_date = content_tag('td', format_date(child.start_date), :class => 'start-date')
else
start_date = content_tag('td', '', :class => 'start-date')
end
end
due_date = ''
if show_due
if !child.disabled_core_fields.include?('due_date') && !child.due_date.nil?
due_date = content_tag('td', format_date(child.due_date), :class => 'due-date')
else
due_date = content_tag('td', '', :class => 'due-date')
end
end
estimated = ''
if show_estimated
if !child.disabled_core_fields.include?('estimated_hours') && !child.estimated_hours.nil?
estimated = content_tag('td', "#{child.estimated_hours}h", :class => 'estimated-hours')
else
estimated = content_tag('td', '', :class => 'estimated-hours')
end
end
spent = ''
if show_spent
if child.total_spent_hours > 0
spent = content_tag('td', "#{child.total_spent_hours}h", :class => 'spent-time')
else
spent = content_tag('td', '', :class => 'spent-time')
end
end
css = "issue issue-#{child.id} hascontextmenu"
css << " idnt idnt-#{level}" if level > 0
s << content_tag('tr',
......
content_tag('td', link_to_issue(child, :truncate => 60, :project => (issue.project_id != child.project_id)), :class => 'subject') +
content_tag('td', h(child.status)) +
content_tag('td', link_to_user(child.assigned_to)) +
content_tag('td', progress_bar(child.done_ratio, :width => '80px')),
content_tag('td', progress_bar(child.done_ratio, :width => '80px')) +
start_date + due_date + estimated + spent,
:class => css)
end
s << '</table></form>'
    (1-1/1)