Merge pull request #1635 from siddhantbajaj/user-registration-ticket
One user one registration ticket
This commit is contained in:
commit
135241a56c
8 changed files with 104 additions and 21 deletions
|
|
@ -109,7 +109,7 @@
|
|||
You haven't bought any tickets.
|
||||
= link_to 'Please get some tickets to support us!', conference_tickets_path(@conference.short_title)
|
||||
%p
|
||||
(Your participation won't be valid without getting a ticket)
|
||||
(Your participation won't be valid without getting a registration ticket)
|
||||
|
||||
.row
|
||||
.col-md-12
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
%tr
|
||||
%td.col-sm-8.col-md-6
|
||||
%td.col-sm-8.col-md-4
|
||||
.media
|
||||
.media-body
|
||||
%h4.media-heading
|
||||
|
|
@ -7,9 +7,14 @@
|
|||
%h5.media-heading
|
||||
- unless ticket.description.blank?
|
||||
= markdown(ticket.description)
|
||||
%td.col-sm-1.col-md-2.text-center
|
||||
= ticket.registration_ticket? ? 'Yes' : 'No'
|
||||
%td.col-sm-1.col-md-1
|
||||
= text_field_tag("tickets[][#{ticket.id}]", 0,
|
||||
type: 'number', min: 0, class: "form-control quantity", 'data-id' => ticket.id)
|
||||
- options = { type: 'number', min: 0, class: "form-control quantity", 'data-id' => ticket.id }
|
||||
- if ticket.registration_ticket?
|
||||
- options[:max] = 1
|
||||
- options[:disabled] = current_user.tickets.for_registration(ticket.conference).present?
|
||||
= text_field_tag("tickets[][#{ticket.id}]", 0, options)
|
||||
%td.col-sm-1.col-md-1.text-center
|
||||
= ticket.price.symbol
|
||||
%span{id: "price_#{ticket.id}"}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
%thead
|
||||
%tr
|
||||
%th Ticket
|
||||
%th Registration Ticket
|
||||
%th Quantity
|
||||
%th Price
|
||||
%th Total
|
||||
|
|
@ -21,6 +22,7 @@
|
|||
- @conference.tickets.each do |ticket|
|
||||
= render partial: 'ticket', f: f, locals: {ticket: ticket}
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td.col-sm-1.col-md-1.text-center
|
||||
|
|
@ -46,4 +48,4 @@
|
|||
.col-md-13
|
||||
%p.text-muted.text-center
|
||||
%small
|
||||
* Getting a ticket is mandatory. Your participation will not be valid until you get a ticket.
|
||||
* Getting a registration ticket is mandatory. Your participation will not be valid until you get a registration ticket.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue