osem-fcy/app/views/admin/tickets/show.html.haml

38 lines
924 B
Text
Raw Normal View History

.row
.col-md-12
.page-header
%h1
%div{"data-placement" => "left", "data-toggle" => "tooltip", title: @ticket.description}
= @ticket.title
Ticket
%small
= humanized_money_with_symbol @ticket.price
%p.text-muted
People who bought this ticket
.row
.col-md-12
%table.table.table-hover.datatable
%thead
%th #
%th Name
2016-09-14 19:40:43 +05:30
%th Quantity
%th E-Mail
%th Affiliation
%th Paid
%tbody
- @ticket.buyers.each_with_index do |buyer, index|
%tr
%td
= index + 1
%td
= buyer.name
2016-09-14 19:40:43 +05:30
%td
= buyer.ticket_purchases.where(ticket_id: @ticket.id).sum('quantity')
%td
= buyer.email
%td
= buyer.affiliation
%td
= @ticket.tickets_paid(buyer)