feature: limiting the amount of sub issues displayed on a story cards by the available size

* if more sub issues exist than space is available the amount of omitted issues are noted
pull/6827/head
Jens Ulferts 14 years ago
parent d73a114dec
commit 82d388f6d0
  1. 1
      config/locales/de.yml
  2. 1
      config/locales/en.yml
  3. 22
      lib/taskboard_card/bottom_attributes.rb

@ -118,6 +118,7 @@ de:
story_points_ideal: "Story Points (ideal)" story_points_ideal: "Story Points (ideal)"
task: "Aufgabe" task: "Aufgabe"
unassigned: "Nicht zugewiesen" unassigned: "Nicht zugewiesen"
x_more: "%{count} mehr..."
project_module_backlogs: "Backlogs (Beta)" project_module_backlogs: "Backlogs (Beta)"

@ -118,6 +118,7 @@ en:
story_points_ideal: "Story Points (ideal)" story_points_ideal: "Story Points (ideal)"
task: "Task" task: "Task"
unassigned: "Unassigned" unassigned: "Unassigned"
x_more: "%{count} more..."
project_module_backlogs: "Backlogs (Beta)" project_module_backlogs: "Backlogs (Beta)"

@ -65,12 +65,22 @@ module TaskboardCard
{:height => pdf.font.height, {:height => pdf.font.height,
:at => offset}) :at => offset})
issue.children.each do |child| issue.children.each_with_index do |child, i|
offset = text_box(pdf, subtask_text = "#{child.tracker.name} ##{child.id}: #{child.subject}"
"#{child.tracker.name} ##{child.id} #{child.subject}", offset[0] = 10 #indentation
{:width => pdf.bounds.width,
:height => pdf.font.height, if offset[1] - pdf.font.height < pdf.font.height && issue.children.size - i != 1
:at => offset}) offset = text_box(pdf,
l('backlogs.x_more', :count => issue.children.size - i),
:height => pdf.font.height,
:at => offset)
break
else
offset = text_box(pdf,
"#{child.tracker.name} ##{child.id}: #{child.subject}",
{:height => pdf.font.height,
:at => offset})
end
end end
end end

Loading…
Cancel
Save