Merge master

This commit is contained in:
Michael Ball 2020-02-06 01:20:11 -08:00
commit 7586112f72
217 changed files with 2853 additions and 3035 deletions

View file

@ -2,18 +2,26 @@
%td.col-sm-8.col-md-4
.media
.media-body
%h4.media-heading
= ticket.title
%h5.media-heading
- unless ticket.description.blank?
= markdown(ticket.description)
%td.col-sm-1.col-md-2.text-center
= ticket.registration_ticket? ? 'Yes' : 'No'
%h4.media-heading= ticket.title
%h5.media-heading= markdown(ticket.description)
- if @conference.tickets.for_registration.any?
%td.col-sm-1.col-md-2.text-center
= ticket.registration_ticket? ? 'Yes' : 'No'
%td.col-sm-1.col-md-1
- options = { type: 'number', min: 0, max: 99, 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?
:ruby
options = {
type: 'number',
min: 0,
max: 99,
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?
end
= text_field_tag("tickets[][#{ticket.id}]", 0, options)
%td.col-sm-1.col-md-1.text-center
= ticket.price.symbol

View file

@ -8,22 +8,23 @@
Please choose your tickets for
%strong
= @conference.title
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
%thead
%tr
%th Ticket
%th Registration Ticket
- if @conference.tickets.for_registration.any?
%th Registration Ticket
%th Quantity
%th Price
%th Total
%tbody
- @conference.tickets.visible.each do |ticket|
= render partial: 'ticket', f: f, locals: {ticket: ticket}
= render 'ticket', f: f, ticket: ticket
%tr
%td
%td
- if @conference.tickets.for_registration.any?
%td
%td
%td.col-sm-1.col-md-1.text-center
%h4
@ -32,20 +33,20 @@
%h4
%strong
= @conference.tickets.first.price.symbol
%span{id: 'total_price'}
%span{ id: 'total_price' }
0
.pull-right
.btn-group-vertical
= button_tag(type: 'submit', class: 'btn btn-success btn-lg') do
Continue
%i.fa.fa-shopping-cart
- if current_user.ticket_purchases.by_conference(@conference).any?
= link_to 'Back to registration', conference_conference_registration_path(@conference.short_title), class: 'btn btn-default btn-sm'
- else
= link_to 'Cancel registration', conference_conference_registration_path(@conference.short_title), method: :delete, class: 'btn btn-danger btn-sm',
data: { confirm: 'Are you sure you want to unregister?' }
.row
.col-md-13
%p.text-muted.text-center
%small
* Getting a registration ticket is mandatory. Your participation will not be valid until you get a registration ticket.
= link_to 'Back to registration',
conference_conference_registration_path(@conference.short_title),
class: 'btn btn-default btn-sm'
- if @conference.tickets.for_registration.any?
.row
.col-md-13
%p.text-muted.text-center
%small
Getting a registration ticket is mandatory. Your participation
will not be valid until you get a registration ticket.