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
23
app/controllers/admin/volunteers_controller.rb
Normal file
23
app/controllers/admin/volunteers_controller.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
class Admin::VolunteersController < ApplicationController
|
||||||
|
def index
|
||||||
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||||
|
render :index
|
||||||
|
end
|
||||||
|
|
||||||
|
def show
|
||||||
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||||
|
@volunteers = @conference.registrations.joins(:vchoices).all
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@conference = Conference.find_all_by_short_title(params[:conference_id]).first
|
||||||
|
# @conference.update_attributes(params[:conference])
|
||||||
|
# redirect_to admin_conference_volunteers_path(@conference.short_title)
|
||||||
|
begin
|
||||||
|
@conference.update_attributes!(params[:conference])
|
||||||
|
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :notice => "Volunteering options were successfully updated.")
|
||||||
|
rescue Exception => e
|
||||||
|
redirect_to(admin_conference_volunteer_options_path(:conference_id => params[:conference_id]), :alert => "Volunteering options update failed: #{e.message}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -2,7 +2,8 @@ class Conference < ActiveRecord::Base
|
||||||
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
|
attr_accessible :title, :short_title, :social_tag, :contact_email, :timezone, :html_export_path,
|
||||||
:start_date, :end_date, :rooms_attributes, :tracks_attributes, :dietary_choices_attributes,
|
:start_date, :end_date, :rooms_attributes, :tracks_attributes, :dietary_choices_attributes,
|
||||||
:use_dietary_choices, :use_supporter_levels, :supporter_levels_attributes, :social_events_attributes,
|
:use_dietary_choices, :use_supporter_levels, :supporter_levels_attributes, :social_events_attributes,
|
||||||
:event_types_attributes, :registration_start_date, :registration_end_date, :logo
|
:event_types_attributes, :registration_start_date, :registration_end_date, :logo, :use_vpositions, :use_vdays, :vdays_attributes,
|
||||||
|
:vpositions_attributes
|
||||||
|
|
||||||
has_paper_trail
|
has_paper_trail
|
||||||
|
|
||||||
|
|
@ -17,6 +18,9 @@ class Conference < ActiveRecord::Base
|
||||||
has_many :tracks, :dependent => :destroy
|
has_many :tracks, :dependent => :destroy
|
||||||
has_many :rooms, :dependent => :destroy
|
has_many :rooms, :dependent => :destroy
|
||||||
has_many :registrations, :dependent => :destroy
|
has_many :registrations, :dependent => :destroy
|
||||||
|
has_many :vdays, :dependent => :destroy
|
||||||
|
has_many :vpositions, :dependent => :destroy
|
||||||
|
has_many :vchoices, :dependent => :destroy
|
||||||
|
|
||||||
belongs_to :venue
|
belongs_to :venue
|
||||||
|
|
||||||
|
|
@ -28,6 +32,8 @@ class Conference < ActiveRecord::Base
|
||||||
accepts_nested_attributes_for :supporter_levels, :allow_destroy => true
|
accepts_nested_attributes_for :supporter_levels, :allow_destroy => true
|
||||||
accepts_nested_attributes_for :event_types, :allow_destroy => true
|
accepts_nested_attributes_for :event_types, :allow_destroy => true
|
||||||
accepts_nested_attributes_for :email_settings
|
accepts_nested_attributes_for :email_settings
|
||||||
|
accepts_nested_attributes_for :vdays, :allow_destroy => true
|
||||||
|
accepts_nested_attributes_for :vpositions, :allow_destroy => true
|
||||||
|
|
||||||
has_attached_file :logo,
|
has_attached_file :logo,
|
||||||
:styles => {:thumb => "100x100>", :large => "300x300>" }
|
:styles => {:thumb => "100x100>", :large => "300x300>" }
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ class Person < ActiveRecord::Base
|
||||||
include Gravtastic
|
include Gravtastic
|
||||||
gravtastic :size => 32
|
gravtastic :size => 32
|
||||||
|
|
||||||
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname
|
attr_accessible :email, :first_name, :last_name, :public_name, :biography, :company, :avatar, :irc_nickname, :mobile, :tshirt, :languages, :volunteer_experience
|
||||||
|
|
||||||
belongs_to :user, :inverse_of => :person
|
belongs_to :user, :inverse_of => :person
|
||||||
has_many :event_people, :dependent => :destroy
|
has_many :event_people, :dependent => :destroy
|
||||||
|
|
@ -18,6 +18,7 @@ class Person < ActiveRecord::Base
|
||||||
|
|
||||||
before_create :generate_guid
|
before_create :generate_guid
|
||||||
before_save :set_public_name
|
before_save :set_public_name
|
||||||
|
before_save :languages_upcase
|
||||||
|
|
||||||
has_attached_file :avatar,
|
has_attached_file :avatar,
|
||||||
:styles => {:tiny => "16x16>", :small => "32x32>", :large => "128x128>"},
|
:styles => {:tiny => "16x16>", :small => "32x32>", :large => "128x128>"},
|
||||||
|
|
@ -26,6 +27,10 @@ class Person < ActiveRecord::Base
|
||||||
|
|
||||||
alias_attribute :affiliation, :company
|
alias_attribute :affiliation, :company
|
||||||
|
|
||||||
|
def languages_upcase
|
||||||
|
self.languages = self.languages.upcase
|
||||||
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
if self.public_name.empty?
|
if self.public_name.empty?
|
||||||
self.first_name + " " + self.last_name
|
self.first_name + " " + self.last_name
|
||||||
|
|
|
||||||
|
|
@ -7,11 +7,12 @@ class Registration < ActiveRecord::Base
|
||||||
has_one :supporter_level, :through => :supporter_registration
|
has_one :supporter_level, :through => :supporter_registration
|
||||||
has_and_belongs_to_many :social_events
|
has_and_belongs_to_many :social_events
|
||||||
has_and_belongs_to_many :events
|
has_and_belongs_to_many :events
|
||||||
|
has_and_belongs_to_many :vchoices
|
||||||
|
|
||||||
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner,
|
attr_accessible :person_id, :conference_id, :attending_social_events, :attending_with_partner,
|
||||||
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
:using_affiliated_lodging, :arrival, :departure, :person_attributes, :other_dietary_choice, :dietary_choice_id,
|
||||||
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
:handicapped_access_required, :supporter_registration_attributes, :social_event_ids, :other_special_needs,
|
||||||
:event_ids, :attended
|
:event_ids, :attended, :volunteer, :vchoice_ids
|
||||||
|
|
||||||
accepts_nested_attributes_for :person
|
accepts_nested_attributes_for :person
|
||||||
accepts_nested_attributes_for :supporter_registration
|
accepts_nested_attributes_for :supporter_registration
|
||||||
|
|
@ -23,6 +24,10 @@ class Registration < ActiveRecord::Base
|
||||||
delegate :email, :to => :person
|
delegate :email, :to => :person
|
||||||
delegate :irc_nickname, :to => :person
|
delegate :irc_nickname, :to => :person
|
||||||
delegate :company, :to => :person
|
delegate :company, :to => :person
|
||||||
|
delegate :mobile, :to => :person
|
||||||
|
delegate :languages, :to => :person
|
||||||
|
delegate :volunteer_experience, :to => :person
|
||||||
|
delegate :tshirt, :to => :person
|
||||||
|
|
||||||
alias_attribute :with_partner, :attending_with_partner
|
alias_attribute :with_partner, :attending_with_partner
|
||||||
alias_attribute :need_access, :handicapped_access_required
|
alias_attribute :need_access, :handicapped_access_required
|
||||||
|
|
|
||||||
6
app/models/vchoice.rb
Normal file
6
app/models/vchoice.rb
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Vchoice < ActiveRecord::Base
|
||||||
|
belongs_to :vday
|
||||||
|
belongs_to :vposition
|
||||||
|
|
||||||
|
has_and_belongs_to_many :registrations
|
||||||
|
end
|
||||||
8
app/models/vday.rb
Normal file
8
app/models/vday.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
class Vday < ActiveRecord::Base
|
||||||
|
attr_accessible :day, :description
|
||||||
|
|
||||||
|
belongs_to :conference
|
||||||
|
|
||||||
|
has_many :vchoices
|
||||||
|
has_many :vpositions, :through => :vchoices, :dependent => :destroy
|
||||||
|
end
|
||||||
10
app/models/vposition.rb
Normal file
10
app/models/vposition.rb
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
class Vposition < ActiveRecord::Base
|
||||||
|
attr_accessible :title, :description, :date, :vday_ids
|
||||||
|
|
||||||
|
belongs_to :conference
|
||||||
|
|
||||||
|
has_many :vchoices
|
||||||
|
has_many :vdays, :through => :vchoices
|
||||||
|
|
||||||
|
validates_presence_of :title, :vdays
|
||||||
|
end
|
||||||
|
|
@ -43,4 +43,7 @@
|
||||||
%li.active= link_to "Dietary Choices", "#"
|
%li.active= link_to "Dietary Choices", "#"
|
||||||
- else
|
- else
|
||||||
%li= link_to "Dietary Choices", admin_conference_dietary_list_path(@conference.short_title)
|
%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
|
.row
|
||||||
.span12
|
.span12
|
||||||
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f|
|
= semantic_form_for(@registration, :url => register_conference_path(@conference.short_title), :html => { :method => :put }) do |f|
|
||||||
= f.inputs :name => "Your Details" do
|
.tabbable
|
||||||
%br
|
%ul.nav.nav-tabs
|
||||||
Your public name (required)
|
%li.active
|
||||||
%br
|
= link_to "Register", "#register-content", "data-toggle"=>"tab"
|
||||||
= f.fields_for :person do |p|
|
%li
|
||||||
= p.text_field :public_name, :for => :person
|
= link_to "Volunteer", "#volunteer-content", "data-toggle"=>"tab"
|
||||||
- if @conference.use_supporter_levels?
|
.tab-content
|
||||||
= f.semantic_fields_for :supporter_registration do |reg|
|
#register-content.tab-pane.active
|
||||||
= reg.input :supporter_level, :as => :select, :collection => @conference.supporter_levels
|
= render 'conference_registration/registration', :f => f
|
||||||
= reg.input :code, :label => "Confirmation or registration code (if applicable)"
|
#volunteer-content.tab-pane
|
||||||
%span#supporter-link.help-block
|
= render 'conference_registration/volunteer', :f => f
|
||||||
= 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)"
|
|
||||||
- if @registered
|
- if @registered
|
||||||
= f.action :submit, :button_html => { :value => "Update Registration", :class => "btn btn-primary" }
|
= 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",
|
= link_to "Unregister", register_conference_path(@conference.short_title),:method => :delete, :class => "btn btn-danger",
|
||||||
:confirm => "Are you sure you want to unregister?"
|
:confirm => "Are you sure you want to unregister?"
|
||||||
- else
|
- else
|
||||||
= f.action :submit, :button_html => { :value => "Register", :class => "btn btn-primary" }
|
= 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)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
@ -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.
|
words. Biographies are limited to 150 words.
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
= render :partial => 'devise/registrations/volunteerperson', :locals => {:p => p}
|
||||||
|
|
||||||
= f.inputs :name => "Account" do
|
= f.inputs :name => "Account" do
|
||||||
= f.input :email, :required => false
|
= f.input :email, :required => false
|
||||||
= f.input :password, :hint => "(Leave blank if you don't want to change it)", :input_html => {:autocomplete => "off"}
|
= 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
|
= link_to(admin_conference_stats_path(@conference.short_title)) do
|
||||||
%i.icon-tasks
|
%i.icon-tasks
|
||||||
Statistics
|
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
|
%li
|
||||||
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
= link_to(admin_conference_schedule_path(@conference.short_title), :target => "_blank") do
|
||||||
%i.icon-calendar
|
%i.icon-calendar
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,9 @@ Osem::Application.routes.draw do
|
||||||
put "/tracks" => "tracks#update", :as => "tracks_update"
|
put "/tracks" => "tracks#update", :as => "tracks_update"
|
||||||
get "/dietary_choices" => "dietchoices#show", :as => "dietary_list"
|
get "/dietary_choices" => "dietchoices#show", :as => "dietary_list"
|
||||||
put "/dietary_choices" => "dietchoices#update", :as => "dietary_update"
|
put "/dietary_choices" => "dietchoices#update", :as => "dietary_update"
|
||||||
|
get "/volunteers_list" => "volunteers#show"
|
||||||
|
get "/volunteers" => "volunteers#index", :as => "volunteer_options"
|
||||||
|
put "/volunteers" => "volunteers#update", :as => "volunteer_options_update"
|
||||||
get "/cfp" => "callforpapers#show", :as => "cfp_info"
|
get "/cfp" => "callforpapers#show", :as => "cfp_info"
|
||||||
put "/cfp" => "callforpapers#update", :as => "cfp_update"
|
put "/cfp" => "callforpapers#update", :as => "cfp_update"
|
||||||
post "/cfp" => "callforpapers#create", :as => "cfp_create"
|
post "/cfp" => "callforpapers#create", :as => "cfp_create"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddVolunteerToRegistrations < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :registrations, :volunteer, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddVolunteerExperienceToRegistrations < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :people, :volunteer_experience, :text
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20130821102047_add_tshirt_to_people.rb
Normal file
5
db/migrate/20130821102047_add_tshirt_to_people.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddTshirtToPeople < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :people, :tshirt, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20130821102108_add_mobile_to_people.rb
Normal file
5
db/migrate/20130821102108_add_mobile_to_people.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddMobileToPeople < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :people, :mobile, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
5
db/migrate/20130821102404_add_languages_to_people.rb
Normal file
5
db/migrate/20130821102404_add_languages_to_people.rb
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddLanguagesToPeople < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :people, :languages, :string
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddUseVpositionsToConferences < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conferences, :use_vpositions, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddUseVdaysToConferences < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :conferences, :use_vdays, :boolean
|
||||||
|
end
|
||||||
|
end
|
||||||
15
db/migrate/20130821133651_create_vpositions.rb
Normal file
15
db/migrate/20130821133651_create_vpositions.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
class CreateVpositions < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
create_table :vpositions do |t|
|
||||||
|
t.references :conference
|
||||||
|
t.string :title, :null => false
|
||||||
|
t.text :description
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
drop_table :vpositions
|
||||||
|
end
|
||||||
|
end
|
||||||
15
db/migrate/20130821133850_create_vdays.rb
Normal file
15
db/migrate/20130821133850_create_vdays.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
class CreateVdays < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
create_table :vdays do |t|
|
||||||
|
t.references :conference
|
||||||
|
t.date :day
|
||||||
|
t.text :description
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
drop_table :vdays
|
||||||
|
end
|
||||||
|
end
|
||||||
8
db/migrate/20131228214532_create_vchoices.rb
Normal file
8
db/migrate/20131228214532_create_vchoices.rb
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
class CreateVchoices < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :vchoices do |t|
|
||||||
|
t.references :vday
|
||||||
|
t.references :vposition
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
11
db/migrate/20131229072532_registrations_vchoices.rb
Normal file
11
db/migrate/20131229072532_registrations_vchoices.rb
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
class RegistrationsVchoices < ActiveRecord::Migration
|
||||||
|
def up
|
||||||
|
create_table :registrations_vchoices, :id => false do |t|
|
||||||
|
t.references :registration, :vchoice
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def down
|
||||||
|
drop_table :registrations_vchoices
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue