osem-fcy/app/views/conference_registrations/show.html.haml
Chaitanya 008ccf8b6d Add user path to Attendee and Speaker avatar in registration show page
Avatars of attendee and speaker are not linked to respective attendee and speaker. Add user path to each avatar to give more information of attendee and speaker
2017-05-13 22:14:57 +03:00

156 lines
6 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
-if @tickets.any?
%h4
%span.fa-stack
%i.fa.fa-square-o.fa-stack-2x
%i.fa.fa-ticket.fa-stack-1x
Ticket Purchases
= "(#{@tickets.first.price.symbol}#{humanized_money @total_price})"
%ul
.col-md-12
- @ticket_payments.each_pair do |ticket_id, tickets|
%li
= @total_quantity[ticket_id]
= tickets.first.title
= word_pluralize(@total_quantity[ticket_id], 'Ticket')
for
= tickets.first.price.symbol
= humanized_money tickets.first.price
%br
- if @tickets.any?
= link_to 'Get more tickets', conference_tickets_path(@conference.short_title), class: "btn btn-default"
- else
You haven't bought any tickets.
= link_to 'Please get some tickets to support us!', conference_tickets_path(@conference.short_title)
%p
(Your participation won't be valid without getting a ticket)
.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
- if @tickets.any?
= link_to 'Unregister', conference_conference_registration_path(@conference.short_title), method: :delete, class: 'btn btn-danger btn-xs',
data: { confirm: "Your ticket purchases won't be refunded. Are you sure you want to unregister?" }, disabled: @conference.end_date < Date.today
- else
= link_to 'Unregister', conference_conference_registration_path(@conference.short_title), method: :delete, class: 'btn btn-danger btn-xs',
data: { confirm: "You haven't purchased any ticket. 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|
= link_to image_tag(participant.gravatar_url(size: '25'), title: "#{participant.name}!", class: 'img-circle'), user_path(participant)
.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|
= link_to image_tag(speaker.gravatar_url(size: '25'), title: "#{speaker.name}!", class: 'img-circle'), user_path(speaker)