osem-fcy/app/views/admin/tickets/show.html.haml
Chrisbr 5f8a8ac6d9 Refactoring Tickets
- Tickets now independent from registration
- Implemented money gem
#419
2014-08-28 15:21:05 +02:00

33 lines
826 B
Text

%h1
= @ticket.title
%small
= humanized_money_with_symbol @ticket.price
- if @ticket.description.present?
%p.lead
= markdown(@ticket.description)
%h4 The following persons bought this ticket:
%table.table#buyers-datatable
%thead
%th #
%th Name
%th E-Mail
%th Affiliation
%th Paid
%tbody
- @ticket.buyers.each_with_index do |buyer, index|
%tr
%td
= index + 1
%td
= buyer.name
%span.label.label-success
= buyer.ticket_purchases.find_by(ticket_id: @ticket.id).quantity
%td
= buyer.email
%td
= buyer.affiliation
%td
= @ticket.paid?(buyer)
= link_to 'Edit', edit_admin_conference_ticket_path(@conference.short_title, @ticket.id),
method: :get, class: 'btn btn-primary'