|
|
|
@ -237,9 +237,17 @@ module IssuesHelper |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
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) + |
|
|
|
|
content_tag(:div, textilizable("\n" + limited_description), :class => "indent") |
|
|
|
|
content_tag(:div, textilizable("\n" + description_lines.to_s), :class => "indent") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|