modify ticket purchases view

This commit is contained in:
Rishabh Saxena 2016-07-27 19:40:21 +05:30
parent 92dc0edff2
commit 1894cea975
3 changed files with 9 additions and 26 deletions

View file

@ -8,12 +8,8 @@
- unless ticket.description.blank?
= markdown(ticket.description)
%td.col-sm-1.col-md-1
- 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)
- else
= text_field_tag("tickets[][#{ticket.id}]", 0, type: 'number', min: 0,
class: "form-control quantity", 'data-id' => ticket.id)
%td.col-sm-1.col-md-1.text-center
= ticket.price.symbol
%span{id: "price_#{ticket.id}"}

View file

@ -5,10 +5,10 @@
%h1
Tickets
%p.lead
If you like, support
Please choose your tickets for
%strong
= @conference.title
by buying a ticket*
here*
=form_tag(conference_ticket_purchases_path, method: :post) do |f|
%table.table.table-hover
%thead
@ -35,12 +35,11 @@
.pull-right
.btn-group-vertical
= button_tag(type: 'submit', class: 'btn btn-success btn-lg') do
Support
Continue
%i.fa.fa-shopping-cart
= link_to 'Continue without a Ticket!', conference_conference_registration_path(@conference.short_title),
class: 'btn btn-danger btn-sm'
= link_to 'Cancel registration', conference_conference_registration_path(@conference.short_title), method: :delete, class: 'btn btn-danger btn-sm'
.row
.col-md-13
%p.text-muted.text-center
%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.