update ticket purchase and conference registration views for new structure

This commit is contained in:
Rishabh Saxena 2016-06-18 18:32:21 +05:30
parent 14594c7a4d
commit b202984fa9
3 changed files with 28 additions and 28 deletions

View file

@ -89,29 +89,30 @@
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-ticket.fa-stack-1x
Tickets
Ticket Purchases
-if @tickets.any?
= "(#{@total_price} #{@tickets.first.price.symbol})"
= "(#{@tickets.first.price.symbol}#{humanized_money @total_price})"
%ul
- @tickets.each do |ticket|
%li
= ticket.quantity
= ticket.title
= word_pluralize(ticket.quantity, 'Ticket')
for
= humanized_money ticket.price
= ticket.price.symbol
= link_to conference_ticket_purchase_path(@conference.short_title, ticket.id), method: :delete,
id: "ticket-#{ticket.id}-delete",
class: 'btn btn-danger btn-xs',
data: { confirm: "Do you really want to delete the #{ticket.title} ticket for #{@conference.title}?" } do
%i.fa.fa-trash-o
%li
- if @tickets.any?
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title)
- else
You haven't bought any tickets.
= link_to 'Please buy some tickets to support us!', conference_tickets_path(@conference.short_title)
.col.md-4
- @ticket_payments.each_pair do |payment, tickets|
%strong
Purchased
- tickets.each do |ticket|
%li
= ticket.quantity
= ticket.title
= word_pluralize(ticket.quantity, 'Ticket')
for
= ticket.price.symbol
= humanized_money ticket.price
%hr
- if @tickets.any?
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title), class: "btn btn-default"
- else
You haven't bought any tickets.
= link_to 'Please buy some tickets to support us!', conference_tickets_path(@conference.short_title)
%p
(Your registration won't be complete without buying a ticket)
.row
.col-md-12