mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
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.
34 lines
1,017 B
Text
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
|