mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
parent
99e5af3217
commit
d6c7e8d97f
1 changed files with 14 additions and 11 deletions
|
|
@ -25,20 +25,23 @@ class TicketPdf < Prawn::Document
|
|||
move_up @mid_vertical
|
||||
draw_text 'TICKET HOLDER', at: [@x, cursor - 30], size: 17
|
||||
dash(2, space: 0)
|
||||
stroke_rectangle [@x, cursor - 50], 230, 150
|
||||
move_down 80
|
||||
draw_text 'NAME', at: [@x + 10, cursor], size: 13
|
||||
fill_color '808080'
|
||||
draw_text @user.name.to_s, at: [@x + 10, cursor - 25], size: 20
|
||||
fill_color '000000'
|
||||
draw_text 'EMAIL', at: [@x + 10, cursor - 50], size: 13
|
||||
fill_color '808080'
|
||||
draw_text @user.email.to_s, at: [@x + 10, cursor - 75], size: 20
|
||||
fill_color '000000'
|
||||
move_up 20
|
||||
bounding_box [@x, cursor - 50], width: 230, height: 150 do
|
||||
pad(15) do
|
||||
text_box 'NAME', at: [@x + 10, cursor], size: 13
|
||||
fill_color '808080'
|
||||
text_box @user.name.to_s, at: [@x + 10, cursor - 20], size: 18
|
||||
fill_color '000000'
|
||||
text_box 'EMAIL', at: [@x + 10, cursor - 60], size: 13
|
||||
fill_color '808080'
|
||||
text_box @user.email.to_s, at: [@x + 10, cursor - 80], size: 18, overflow: :shrink_to_fit
|
||||
fill_color '000000'
|
||||
end
|
||||
stroke_bounds
|
||||
end
|
||||
end
|
||||
|
||||
def draw_second_square
|
||||
move_up 150
|
||||
if @conference.picture?
|
||||
if 7 * @conference.picture.image[:width] > 12 * @conference.picture.image[:height]
|
||||
image "#{Rails.root}/public#{@conference.picture_url}", at: [@mid_horizontal + 30, cursor], width: 120
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue