update ticket purchase and conference registration views for new structure
This commit is contained in:
parent
14594c7a4d
commit
b202984fa9
3 changed files with 28 additions and 28 deletions
|
|
@ -89,29 +89,30 @@
|
||||||
%span.fa-stack
|
%span.fa-stack
|
||||||
%i.fa.fa-square-o.fa-stack-2x
|
%i.fa.fa-square-o.fa-stack-2x
|
||||||
%i.fa.fa-ticket.fa-stack-1x
|
%i.fa.fa-ticket.fa-stack-1x
|
||||||
Tickets
|
Ticket Purchases
|
||||||
-if @tickets.any?
|
-if @tickets.any?
|
||||||
= "(#{@total_price} #{@tickets.first.price.symbol})"
|
= "(#{@tickets.first.price.symbol}#{humanized_money @total_price})"
|
||||||
%ul
|
%ul
|
||||||
- @tickets.each do |ticket|
|
.col.md-4
|
||||||
|
- @ticket_payments.each_pair do |payment, tickets|
|
||||||
|
%strong
|
||||||
|
Purchased
|
||||||
|
- tickets.each do |ticket|
|
||||||
%li
|
%li
|
||||||
= ticket.quantity
|
= ticket.quantity
|
||||||
= ticket.title
|
= ticket.title
|
||||||
= word_pluralize(ticket.quantity, 'Ticket')
|
= word_pluralize(ticket.quantity, 'Ticket')
|
||||||
for
|
for
|
||||||
= humanized_money ticket.price
|
|
||||||
= ticket.price.symbol
|
= ticket.price.symbol
|
||||||
= link_to conference_ticket_purchase_path(@conference.short_title, ticket.id), method: :delete,
|
= humanized_money ticket.price
|
||||||
id: "ticket-#{ticket.id}-delete",
|
%hr
|
||||||
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?
|
- if @tickets.any?
|
||||||
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title)
|
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title), class: "btn btn-default"
|
||||||
- else
|
- else
|
||||||
You haven't bought any tickets.
|
You haven't bought any tickets.
|
||||||
= link_to 'Please buy some tickets to support us!', conference_tickets_path(@conference.short_title)
|
= 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
|
.row
|
||||||
.col-md-12
|
.col-md-12
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
= markdown(ticket.description)
|
= markdown(ticket.description)
|
||||||
%td.col-sm-1.col-md-1
|
%td.col-sm-1.col-md-1
|
||||||
- if ticket.bought?(current_user)
|
- if ticket.bought?(current_user)
|
||||||
= text_field_tag("tickets[][#{ticket.id}]", ticket.quantity_bought_by(current_user),
|
= text_field_tag("tickets[][#{ticket.id}]", 0,
|
||||||
type: 'number', min: 0, class: "form-control quantity", 'data-id' => ticket.id)
|
type: 'number', min: 0, class: "form-control quantity", 'data-id' => ticket.id)
|
||||||
- else
|
- else
|
||||||
= text_field_tag("tickets[][#{ticket.id}]", 0, type: 'number', min: 0,
|
= text_field_tag("tickets[][#{ticket.id}]", 0, type: 'number', min: 0,
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@
|
||||||
%h1
|
%h1
|
||||||
Tickets
|
Tickets
|
||||||
%p.lead
|
%p.lead
|
||||||
If you like, support
|
Please choose your tickets for
|
||||||
%strong
|
%strong
|
||||||
= @conference.title
|
= @conference.title
|
||||||
by buying a ticket*
|
here*
|
||||||
=form_tag(conference_ticket_purchases_path, method: :post) do |f|
|
=form_tag(conference_ticket_purchases_path, method: :post) do |f|
|
||||||
%table.table.table-hover
|
%table.table.table-hover
|
||||||
%thead
|
%thead
|
||||||
|
|
@ -35,12 +35,11 @@
|
||||||
.pull-right
|
.pull-right
|
||||||
.btn-group-vertical
|
.btn-group-vertical
|
||||||
= button_tag(type: 'submit', class: 'btn btn-success btn-lg') do
|
= button_tag(type: 'submit', class: 'btn btn-success btn-lg') do
|
||||||
Support
|
Continue
|
||||||
%i.fa.fa-shopping-cart
|
%i.fa.fa-shopping-cart
|
||||||
= link_to 'Continue without a Ticket!', conference_conference_registration_path(@conference.short_title),
|
= link_to 'Cancel registration', conference_conference_registrations_path(@conference.short_title), method: :delete, class: 'btn btn-danger btn-sm'
|
||||||
class: 'btn btn-danger btn-sm'
|
|
||||||
.row
|
.row
|
||||||
.col-md-13
|
.col-md-13
|
||||||
%p.text-muted.text-center
|
%p.text-muted.text-center
|
||||||
%small
|
%small
|
||||||
* Buying a ticket is not mandatory. Checkout will be at the conference registration.
|
* Buying a ticket is mandatory. Your registration will not complete until you buy a ticket.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue