OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/lib/open_project/backlogs/taskboard_card/card.rb

34 lines
942 B

module OpenProject::Backlogs::TaskboardCard
class Card < CardArea
unloadable
include Redmine::I18n
class << self
def areas
[OpenProject::Backlogs::TaskboardCard::Header,
OpenProject::Backlogs::TaskboardCard::TopAttributes,
OpenProject::Backlogs::TaskboardCard::Description,
OpenProject::Backlogs::TaskboardCard::BottomAttributes
]
end
def margin
20
end
def render(pdf, issue, options)
render_bounding_box(pdf, options.merge(:border => true, :margin => margin)) do
y_offset = pdf.bounds.height
Card.areas.each do |card|
height = pdf.bounds.height * card.pref_size_percent[1]
card.render(pdf, issue, {:at => [0, y_offset],
:height => height})
y_offset -= height + pdf.bounds.height * 0.01
end
end
end
end
end
end