osem-fcy/app/views/conference_registrations/show.html.haml

154 lines
5.9 KiB
Text

.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
%p.text-muted
-if @conference.venue
at
%strong
= "#{@conference.venue.name},"
= "#{@conference.venue.street},"
= "#{@conference.venue.city} / #{@conference.venue.country_name}."
%small
= date_string(@conference.start_date, @conference.end_date)
.row
.col-md-12
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-plane.fa-stack-1x
Travel Schedule
%ul
%li
- if @registration.arrival.present?
arrive at
%strong
= @registration.arrival.strftime('%A, %B %-d. %Y %H:%M')
- else
You haven't scheduled your arrival
%li
- if @registration.departure.present?
depart at
%strong
= @registration.departure.strftime('%A, %B %-d. %Y %H:%M')
- else
You haven't scheduled your departure
- if @conference.questions.any?
.row
.col-md-12
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-info.fa-stack-1x
Additional Info
%ul
- @conference.questions.each do |q|
%li
%strong
= q.title
- if @registration.qanswers.any?
- @registration.qanswers.where(:question_id => q.id).each do |qa|
= qa.answer.title
- else
You haven't answered
- if @registration.events.any?
.row
.col-md-12
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-check.fa-stack-1x
Registered to the following event(s)
%ul
- @registration.events.each do |event|
%li
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
= '(' + registered_text(event) + ')'
- if @registration.conference.program.events.remaining_for_registration(@registration).any?
.row
.col-md-12
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-question.fa-stack-1x
Events that require registration
%ul
- @registration.conference.program.events.remaining_for_registration(@registration).each do |event|
%li
= link_to event.title, conference_program_proposal_path(@conference.short_title, event.id)
= '(' + registered_text(event) + ')'
- if @conference.tickets.any?
.row
.col-md-12
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-ticket.fa-stack-1x
Tickets
-if @tickets.any?
= "(#{@total_price} #{@tickets.first.price.symbol})"
%ul
- @tickets.each do |ticket|
%li
= ticket.quantity
= ticket.title
= word_pluralize(ticket.quantity, 'Ticket')
for
= humanized_money ticket.price
= ticket.price.symbol
= link_to conference_ticket_purchase_path(@conference.short_title, ticket.id), method: :delete,
id: "ticket-#{ticket.id}-delete",
class: 'btn btn-danger btn-xs',
data: { confirm: "Do you really want to delete the #{ticket.title} ticket for #{@conference.title}?" } do
%i.fa.fa-trash-o
%li
- if @tickets.any?
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title)
- else
You haven't bought any tickets.
= link_to 'Please buy some tickets to support us!', conference_tickets_path(@conference.short_title)
.row
.col-md-12
-if @registration
.btn-group-vertical.pull-right
= link_to 'Edit your Registration', edit_conference_conference_registration_path(@conference.short_title), class: 'btn btn-success', disabled: @conference.end_date < Date.today
= link_to 'Unregister', conference_conference_registration_path(@conference.short_title),
method: :delete, class: 'btn btn-danger btn-xs', confirm: 'Are you sure you want to unregister?', disabled: @conference.end_date < Date.today
- else
= link_to 'Register', new_conference_conference_registration_path(@conference.short_title), class: 'btn btn-success btn-lg pull-right'
.row
.col-md-12
.page-header
%h1
%small
Meet the people of
= @conference.short_title
.col-md-4
- if @conference.participants.any?
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-group.fa-stack-1x
= @conference.participants.count
Registered
= word_pluralize(@conference.participants.count, 'Attendee')
- @conference.participants.each do |participant|
= image_tag(participant.gravatar_url(size: '25'), title: "#{participant.name}!", class: 'img-circle')
.col-md-4.col-md-offset-2
- if @conference.program.speakers.confirmed.any?
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-microphone.fa-stack-1x
= @conference.program.speakers.confirmed.count
Confirmed
= word_pluralize(@conference.program.speakers.confirmed.count, 'Speaker')
- @conference.program.speakers.confirmed.each do |speaker|
= image_tag(speaker.gravatar_url(size: '25'), title: "#{speaker.name}!", class: 'img-circle')