osem-fcy/app/views/tickets/_ticket.html.haml
James Mason 072116fffe Enable registration to proceed without requiring a ticket.
Requiring a ticket after registration is convoluted; while it may be neccesary
for some workflows, it definitely isn't for others, and the core of osem
doesn't need it... so let's make it optional.
2019-02-16 00:53:40 +01:00

34 lines
1,017 B
Text

%tr
%td.col-sm-8.col-md-4
.media
.media-body
%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
: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
%span{id: "price_#{ticket.id}"}
= humanized_money ticket.price
%td.col-sm-1.col-md-1.text-center
%strong
= ticket.price.symbol
%span.total_row{id: "total_row_#{ticket.id}"}
0