.container
  .row
    .col-md-12
      .page-header
        %h1
          Ticket for
          = @conference.title
        %p.text-muted
          - if @conference.venue
            at
            %strong
              #{@conference.venue_name},
            #{@conference.venue_street},
            #{@conference.city} / #{@conference.country_name}.
          %small
            = date_string(@conference.start_date, @conference.end_date)
  .row
    .col-md-5.box.well
      %h3.text-center
        Ticket Holder
      %p.text-left
        %strong
          Name
        %br
        = @user.name
        %br
        %br
        %strong
          Email
        %br
        = @user.email
    .col-md-5.col-md-offset-2.box.well
      - if @conference.picture?
        = image_tag(@conference.picture.ticket.url, class: 'img-responsive')
      - else
        = image_tag('/img/osem-logo.png', class: 'img-responsive')
    .col-md-5.box.well
      %p.text-left
        %strong
          Event
        %br
        = @conference.title
        %br
        = @conference.start_date.strftime('%B %d, %Y')
        %br
        %br
        %strong
          Ticket
        %br
        = @physical_ticket.ticket.title
        %br
        %br
        %strong
          Ticket Ref.
        %br
        = @physical_ticket.ticket_purchase.id
        %br
    .col-md-5.col-md-offset-2.box.well
      = image_tag(@qrcode_image.to_data_url, class: 'img-responsive qr-image')
  .row
    .col-md-12
      %p.text-left
        = link_to 'Generate PDF',
        conference_physical_ticket_path(@conference.short_title,
                                        @physical_ticket.token,
                                        format: :pdf),
        class: 'button btn btn-default btn-info'
