Volunteers, positions and days and volunteers list for admin, volunteering option for attendees
This commit is contained in:
parent
125d5fe3ff
commit
64b2b8b3f8
31 changed files with 335 additions and 79 deletions
|
|
@ -43,4 +43,7 @@
|
|||
%li.active= link_to "Dietary Choices", "#"
|
||||
- else
|
||||
%li= link_to "Dietary Choices", admin_conference_dietary_list_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)
|
||||
7
app/views/admin/volunteers/_vday_fields.html.erb
Normal file
7
app/views/admin/volunteers/_vday_fields.html.erb
Normal 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>
|
||||
19
app/views/admin/volunteers/_volunteers_table.html.haml
Normal file
19
app/views/admin/volunteers/_volunteers_table.html.haml
Normal 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
|
||||
8
app/views/admin/volunteers/_vposition_fields.html.erb
Normal file
8
app/views/admin/volunteers/_vposition_fields.html.erb
Normal 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>
|
||||
15
app/views/admin/volunteers/index.html.haml
Normal file
15
app/views/admin/volunteers/index.html.haml
Normal 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
|
||||
6
app/views/admin/volunteers/show.html.haml
Normal file
6
app/views/admin/volunteers/show.html.haml
Normal 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!
|
||||
76
app/views/conference_registration/_registration.html.haml
Normal file
76
app/views/conference_registration/_registration.html.haml
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
.row
|
||||
.span12
|
||||
%h3
|
||||
Registration for
|
||||
= @conference.title
|
||||
- if @person.proposal_count(@conference) > 0
|
||||
.row
|
||||
.span12
|
||||
%i
|
||||
Please note: Registration is not automatically performed for speakers. If you're scheduled to speak at the conference, you still need to register!
|
||||
.row
|
||||
.span12
|
||||
= f.inputs :name => "Your Details" do
|
||||
%br
|
||||
Your public name (required)
|
||||
%br
|
||||
= f.fields_for :person do |p|
|
||||
= p.text_field :public_name, :for => :person
|
||||
- if @conference.use_supporter_levels?
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
||||
%span#supporter-link.help-block
|
||||
= f.input :attending_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :handicapped_access_required, :label => false
|
||||
= f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2, :class => "span6"}
|
||||
|
||||
- if @workshops.count > 0
|
||||
=f.inputs "Register to workshops" do
|
||||
= f.input :events, :as => :check_boxes, :label => false, :collection => @workshops
|
||||
|
||||
= f.inputs "Travel Info" do
|
||||
= f.input :arrival, :as => :string, :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, :input_html => {:value => (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), :id => "registration-departure-datepicker", :readonly => "readonly" }
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs "Are you planning to attend any of the parties?" do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, :as => :check_boxes, :label => false
|
||||
- if @conference.use_dietary_choices?
|
||||
= f.inputs "Food" do
|
||||
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
|
||||
:include_blank => false, :label => "Special Dietary Restriction"
|
||||
= f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)"
|
||||
|
||||
:javascript
|
||||
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
|
||||
var str = "";
|
||||
#{generate_supporter_level_js @conference}
|
||||
$("#supporter-link").html(str);
|
||||
})
|
||||
.trigger('change');
|
||||
|
||||
$("#registration-arrival-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.start_date.yesterday.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-departure-datepicker").datepicker("option","minDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
$("#registration-departure-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.end_date.tomorrow.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
16
app/views/conference_registration/_volunteer.html.haml
Normal file
16
app/views/conference_registration/_volunteer.html.haml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
.row
|
||||
.span12
|
||||
= f.input :volunteer, :label => "Click here if you want to become a volunteer at #{@conference.short_title}", :input_html => {:maxlength => 15, :size => 40}
|
||||
= f.fields_for :person do |p|
|
||||
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
|
||||
|
||||
%br
|
||||
- if @conference.vpositions.count > 0
|
||||
%h4
|
||||
%u Positions that require volunteers:
|
||||
- @conference.vpositions.each do |pos|
|
||||
%p{:style => "font-weight:bold"}
|
||||
= pos.title
|
||||
= "(#{pos.description})" if pos.description
|
||||
|
||||
= f.input :vchoices, :collection => pos.vchoices.map {|x| [x.vday.day, x.id]}, :label => "Choose days to volunteer:"
|
||||
|
|
@ -1,83 +1,20 @@
|
|||
.row
|
||||
.span12
|
||||
%h3
|
||||
Registration for
|
||||
= @conference.title
|
||||
- if @person.proposal_count(@conference) > 0
|
||||
.row
|
||||
.span12
|
||||
%i
|
||||
Please note: Registration is not automatically performed for speakers. If you're scheduled to speak at the conference, you still need to register!
|
||||
.row
|
||||
.span12
|
||||
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f|
|
||||
= f.inputs :name => "Your Details" do
|
||||
%br
|
||||
Your public name (required)
|
||||
%br
|
||||
= f.fields_for :person do |p|
|
||||
= p.text_field :public_name, :for => :person
|
||||
- if @conference.use_supporter_levels?
|
||||
= f.semantic_fields_for :supporter_registration do |reg|
|
||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
||||
%span#supporter-link.help-block
|
||||
= f.input :attending_with_partner, :label => false
|
||||
= f.input :using_affiliated_lodging, :label => false
|
||||
= f.input :handicapped_access_required, :label => false
|
||||
= f.input :other_special_needs, :label => "Any other special needs?", :input_html => {:rows => 2}
|
||||
|
||||
- if @workshops.count > 0
|
||||
=f.inputs "Register to workshops" do
|
||||
= f.input :events, :as => :check_boxes, :label => false, :collection => @workshops
|
||||
|
||||
= f.inputs "Travel Info" do
|
||||
= f.input :arrival, :as => :string, :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, :input_html => {:value => (f.object.departure.to_formatted_s(:db_without_seconds) unless f.object.departure.nil?), :id => "registration-departure-datepicker", :readonly => "readonly" }
|
||||
- if @conference.social_events.count > 0
|
||||
= f.inputs "Are you planning to attend any of the parties?" do
|
||||
%br Yes, I'll be attending...
|
||||
%br
|
||||
= f.input :social_events, :as => :check_boxes, :label => false
|
||||
- if @conference.use_dietary_choices?
|
||||
= f.inputs "Food" do
|
||||
= f.input :dietary_choice, :collection => [["None", nil]] + @conference.dietary_choices.map {|x| [x.title, x.id]},
|
||||
:include_blank => false, :label => "Special Dietary Restriction"
|
||||
= f.input :other_dietary_choice, :input_html => {:rows => "2"}, :label => "Other Dietary Restictions (please describe)"
|
||||
.tabbable
|
||||
%ul.nav.nav-tabs
|
||||
%li.active
|
||||
= link_to "Register", "#register-content", "data-toggle"=>"tab"
|
||||
%li
|
||||
= link_to "Volunteer", "#volunteer-content", "data-toggle"=>"tab"
|
||||
.tab-content
|
||||
#register-content.tab-pane.active
|
||||
= render 'conference_registration/registration', :f => f
|
||||
#volunteer-content.tab-pane
|
||||
= render 'conference_registration/volunteer', :f => f
|
||||
- if @registered
|
||||
= f.action :submit, :button_html => { :value => "Update Registration", :class => "btn btn-primary" }
|
||||
= link_to "Unregister", register_conference_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" }
|
||||
|
||||
:javascript
|
||||
$("#registration_supporter_registration_attributes_supporter_level_id").change(function () {
|
||||
var str = "";
|
||||
#{generate_supporter_level_js @conference}
|
||||
$("#supporter-link").html(str);
|
||||
})
|
||||
.trigger('change');
|
||||
|
||||
$("#registration-arrival-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.start_date.yesterday.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-departure-datepicker").datepicker("option","minDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
$("#registration-departure-datepicker").datetimepicker({
|
||||
dateFormat: "yy-mm-dd",
|
||||
timeFormat: "HH:mm",
|
||||
showSecond: false,
|
||||
numberOfMonths: 1,
|
||||
defaultDate: '#{@conference.end_date.tomorrow.strftime('%Y-%m-%d')}',
|
||||
onSelect: function(selected) {
|
||||
$("#registration-arrival-datepicker").datepicker("option","maxDate", selected)
|
||||
}
|
||||
});
|
||||
|
||||
= f.action :submit, :button_html => { :value => "Register", :class => "btn btn-primary" }
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
=p.input :mobile, :label => "Mobile No (Include country code)", :input_html => {:placeholder => "Eg. +336812345679"}, :hint => "Only visible to org team & volunteer coordinator"
|
||||
|
||||
=p.input :tshirt, :label => "Tshirt Size", :collection => [["Choose", nil],["XS","XS"],["S","S"],["M", "M"], ["L", "L"], ["XL", "XL"], ["XXL", "XXL"], ["XXXL", "XXXL"], ["Girl-S","Girl-s"], ["Girl-M","Girl-M"], ["Girl-L","Girl-L"], ["Girl-XL","Girl-XL"]]
|
||||
|
||||
=p.input :languages, :label => "Which languages do you speak", :hint => "Start from the one you speak best and use 2 letter symbolization, eg. EN, GR, DE"
|
||||
|
||||
= p.input :volunteer_experience, :label => "Do you have any past experience?", :input_html => {:rows => 3, :class => "span6"}
|
||||
|
|
@ -16,6 +16,8 @@
|
|||
words. Biographies are limited to 150 words.
|
||||
%br
|
||||
%br
|
||||
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
|
||||
|
||||
= f.inputs :name => "Account" do
|
||||
= f.input :email, :required => false
|
||||
= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,16 @@
|
|||
= link_to(admin_conference_stats_path(@conference.short_title)) do
|
||||
%i.icon-tasks
|
||||
Statistics
|
||||
- if current_page?(admin_conference_volunteers_list_path(@conference.short_title))
|
||||
%li.active
|
||||
= link_to('#') do
|
||||
%i.icon-user
|
||||
Volunteers
|
||||
- else
|
||||
%li
|
||||
= link_to(admin_conference_volunteers_list_path(@conference.short_title)) do
|
||||
%i.icon-user
|
||||
Volunteers
|
||||
%li
|
||||
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||
%i.icon-calendar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue