Merge branch 'final_volunteers' of https://github.com/differentreality/osem into differentreality-final_volunteers

Conflicts:
	app/models/conference.rb
	app/models/registration.rb
	app/views/admin/conference/_sidebar.html.haml
	app/views/conference_registration/register.html.haml
This commit is contained in:
Henne Vogelsang 2014-03-03 10:52:24 +01:00
commit 14a896842b
31 changed files with 342 additions and 43 deletions

View file

@ -51,3 +51,7 @@
%li.active= link_to "Questions", "#"
- else
%li= link_to "Questions", admin_conference_questions_path(@conference.short_title)
- if activated == "volunteers"
%li.active= link_to "Volunteer Options", "#"
- else
%li= link_to "Volunteer Options", admin_conference_volunteer_options_path(@conference.short_title)

View file

@ -0,0 +1,7 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.date_select :day %>
<%= f.input :description, :input_html => {:rows => "2", :class => "span8"} %>
<%= remove_association_link :vday, f %>
<% end %>
</div>

View file

@ -0,0 +1,19 @@
%table.table.table-striped.table-bordered.table-hover#speakertable
%thead
%th First Name
%th Last Name
%th Email
%th Mobile
%th Languages
%th Experience
%th Tshirt Size
%tbody
- @volunteers.each do |volunteer|
%tr
%td= volunteer.first_name
%td= volunteer.last_name
%td= volunteer.email
%td= volunteer.mobile
%td= volunteer.languages
%td= volunteer.volunteer_experience
%td= volunteer.tshirt

View file

@ -0,0 +1,8 @@
<div class="nested-fields">
<%= f.inputs do %>
<%= f.input :title %>
<%= f.input :description, :input_html => {:rows => "2", :class => "span8"}%>
<%= f.input :vdays, :collection => @conference.vdays.map {|x| [x.day, x.id]}, :label => "Position is required for the following days:"%>
<%= remove_association_link :vposition, f %>
<% end %>
</div>

View file

@ -0,0 +1,15 @@
.container-fluid
.row-fluid
.span3
= render 'admin/conference/sidebar', :activated => "Volunteers"
.span9
= semantic_form_for(@conference, :url => admin_conference_volunteer_options_update_path(@conference.short_title)) do |f|
= f.action :submit, :as => :button, :button_html => {:class => "btn btn-primary"}
%br
%br
.span5
= f.input :use_vdays, :label => false
= dynamic_association :vdays, "Volunteer Days", f
.span5
= f.input :use_vpositions, :label => false
= dynamic_association :vpositions, "Volunteer positions", f

View file

@ -0,0 +1,6 @@
- if @volunteers.count > 0
%h3= "Volunteers (#{@volunteers.count})"
%br
= render :partial => "volunteers_table"
- else
%h3 There are no volunteers yet!