Various small fixes for the participant UI

This commit is contained in:
Henne Vogelsang 2014-12-05 16:04:34 +01:00
parent b6abe96279
commit d13efa5f52
31 changed files with 287 additions and 279 deletions

View file

@ -1,23 +1,23 @@
.container
.row
.col-md-12
.page-header
%h1
Registration for
= @conference.title
.row
.col-md-8
= semantic_form_for(@registration, url: conference_conference_registrations_path(@conference.short_title)) do |f|
.tabbable
%ul.nav.nav-tabs
%li.active
= link_to 'Register', '#register-content', 'data-toggle' => 'tab'
- if @conference.use_volunteers
%li
= link_to 'Volunteer', '#volunteer-content', 'data-toggle' => 'tab'
.tab-content
#register-content.tab-pane.active
= render 'conference_registrations/registration', f: f
- if @conference.use_volunteers
#volunteer-content.tab-pane
= render 'conference_registrations/volunteer', f: f
- if @conference.user_registered?(current_user)
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
= link_to 'Unregister', conference_conference_registrations_path(@conference.short_title),
method: :delete, class: 'btn btn-danger', confirm: 'Are you sure you want to unregister?'
- else
= f.action :submit, button_html: { value: 'Register', class: 'btn btn-primary', id: 'register' }
- if @conference.questions.any?
= render partial: 'questions', locals: { f: f }
- if @conference.events.workshops.any?
=f.inputs 'Register to Workshops' do
= f.input :events, as: :check_boxes, label: false, collection: @conference.events.workshops
= f.inputs 'Your Travel Info' do
= f.input :arrival, as: :string, label: 'Your arrival time', input_html: { value: (f.object.arrival.to_formatted_s(:db_without_seconds) unless f.object.arrival.nil?), id: 'registration-arrival-datepicker', readonly: 'readonly' }
= f.input :departure, as: :string, label: 'Your departure time', input_html: { value: (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), id: 'registration-departure-datepicker', readonly: 'readonly' }
%p.pull-right
- if @conference.user_registered?(current_user)
= f.action :submit, button_html: { value: 'Update Registration', class: 'btn btn-primary' }
- else
= f.action :submit, button_html: { value: 'Register', class: 'btn btn-primary', id: 'register' }