Refactoring Tickets

- Tickets now independent from registration
- Implemented money gem
#419
This commit is contained in:
Chrisbr 2014-08-28 15:21:05 +02:00
parent 5485fe0e7f
commit 5f8a8ac6d9
63 changed files with 1581 additions and 573 deletions

View file

@ -17,6 +17,6 @@
= link_to "Modify Registration for #{@conference.short_title}", edit_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- else
= link_to "Register for #{@conference.short_title}", new_conference_conference_registrations_path(@conference.short_title), class: "btn btn-success btn-lg", target: '_blank'
- if @conference.use_supporter_levels?
- if @conference.tickets.any?
- if @conference.include_tickets_in_splash?
= render 'tickets'

View file

@ -1,16 +1,15 @@
%div.row
%h3 Tickets
-if !@conference.ticket_description.blank?
-if @conference.ticket_description.present?
.lead
= markdown(@conference.ticket_description)
- @conference.supporter_levels.each do |s|
- @conference.tickets.each do |ticket|
%div.col-md-6
- if !s.title.blank?
%h4 #{ s.title }
-if !s.description.blank?
.lead #{ s.description }
- if !s.url.blank?
%div.btn-group
= link_to "Buy Ticket", s.url, class: 'btn btn-success', target: '_blank'
- if !s.ticket_price.blank?
= button_tag "#{s.ticket_price}", class: 'btn btn-success'
- if ticket.title.present?
%h4 #{ ticket.title }
- if ticket.description.present?
.lead
= markdown(ticket.description)
%div.btn-group
= link_to "Buy Ticket", conference_tickets_path(@conference.short_title), class: 'btn btn-success'
= button_tag "#{humanized_money_with_symbol ticket.price}", class: 'btn btn-success'