|
|
@ -231,15 +231,23 @@ module IssuesHelper |
|
|
|
:class => issue.css_classes, |
|
|
|
:class => issue.css_classes, |
|
|
|
:title => "#{ truncate(issue.subject, :length => 100) } (#{ issue.status.name })") |
|
|
|
:title => "#{ truncate(issue.subject, :length => 100) } (#{ issue.status.name })") |
|
|
|
ret += "#{ issue.start_date.nil? ? "[?]" : issue.start_date.to_s }" |
|
|
|
ret += "#{ issue.start_date.nil? ? "[?]" : issue.start_date.to_s }" |
|
|
|
ret += " - #{ issue.due_date.nil? ? "[?]" : issue.due_date.to_s }" |
|
|
|
ret += " – #{ issue.due_date.nil? ? "[?]" : issue.due_date.to_s }" |
|
|
|
ret += "#{ issue.assigned_to.nil? ? " " : " (#{h(issue.assigned_to.to_s)})" }" |
|
|
|
ret += "#{ issue.assigned_to.nil? ? " " : " (#{h(issue.assigned_to.to_s)})" }" |
|
|
|
ret |
|
|
|
ret |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def issue_quick_info_with_description(issue, lines = 3) |
|
|
|
def issue_quick_info_with_description(issue, lines = 3) |
|
|
|
limited_description = issue.description.to_s.lines.to_a[0,lines + 1].to_s |
|
|
|
description_lines = issue.description.to_s.lines.to_a[0,lines] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if description_lines[lines-1] && issue.description.to_s.lines.size > lines |
|
|
|
|
|
|
|
description_lines[lines-1].strip! |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
while !description_lines[lines-1].end_with?("...") do |
|
|
|
|
|
|
|
description_lines[lines-1] = description_lines[lines-1] + "." |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
issue_quick_info(issue) + |
|
|
|
issue_quick_info(issue) + |
|
|
|
content_tag(:div, textilizable("\n" + limited_description), :class => "indent") |
|
|
|
content_tag(:div, textilizable("\n" + description_lines.to_s), :class => "indent") |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|