Merge pull request #177 from gopesht/add_tickets_to_registration_segment
Add tickets to registration segment
This commit is contained in:
commit
9e39fedf05
14 changed files with 94 additions and 18 deletions
14
app/views/conference/_registration.html.haml
Normal file
14
app/views/conference/_registration.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
= content_for :splash_nav do
|
||||
%li
|
||||
%a{ href: '#registration' } Registration
|
||||
%div.container.text-center
|
||||
%div.row
|
||||
%h2 Registration
|
||||
- if !@conference.registration_description.blank?
|
||||
%p
|
||||
= @conference.registration_description
|
||||
%h4 Registration period #{ date_string(@conference.registration_start_date, @conference.registration_end_date) }
|
||||
- if @conference.registration_open?
|
||||
= link_to "Register for #{@conference.short_title}", register_conference_path(@conference.short_title), :class =>"btn btn-success btn-lg", target: '_blank'
|
||||
- if @conference.use_supporter_levels?
|
||||
= render 'tickets'
|
||||
15
app/views/conference/_tickets.html.haml
Normal file
15
app/views/conference/_tickets.html.haml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
%div.row
|
||||
%h3 Tickets
|
||||
-if !@conference.ticket_description.blank?
|
||||
%p #{ @conference.ticket_description }
|
||||
- @conference.supporter_levels.each do |s|
|
||||
%div.col-md-6
|
||||
- if !s.title.blank?
|
||||
%h4 #{ s.title }
|
||||
-if !s.description.blank?
|
||||
%p #{ 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'
|
||||
|
|
@ -2,3 +2,6 @@
|
|||
= link_to @conference.title, conference_url(@conference.short_title), class: 'navbar-brand'
|
||||
%div#program
|
||||
= render 'program'
|
||||
%div#registration
|
||||
= render 'registration'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue