Skip to content

Commit

Permalink
Fixes in helper patch
Browse files Browse the repository at this point in the history
Fix issue with newlines

Signed-off-by: Bart vdr. Meulen <bartvdrmeulen@gmail.com>
  • Loading branch information
bartvdrmeulen committed Sep 21, 2012
1 parent 8ce1aeb commit e64d89f
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions lib/redmine_better_gantt_chart/issues_helper_patch.rb
Expand Up @@ -42,18 +42,13 @@ def render_extended_issue_tooltip(issue)
end

unless issue.relations_to.empty?
content += ("<br />" + issue.relations_to.first(display_limit)
.map(&relation_from_link)
.join('<br />')).html_safe

display_limit -= issue.relations_to.count
content += ("<br />" + issue.relations_to.first(display_limit).map(&relation_from_link).join('<br />')).html_safe
display_limit -= issue.relations_to.count
end

unless issue.relations_from.empty?
new_limit = display_limit < 0 ? 0 : display_limit
content += ("<br />" + issue.relations_from.first(new_limit)
.map(&relation_to_link)
.join('<br />')).html_safe
content += ("<br />" + issue.relations_from.first(new_limit).map(&relation_to_link).join('<br />')).html_safe
display_limit -= issue.relations_from.count
end

Expand Down

0 comments on commit e64d89f

Please sign in to comment.