|
@ -243,6 +243,12 @@ module ApplicationHelper |
|
|
}[@this_conference.registration_status] |
|
|
}[@this_conference.registration_status] |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def registration_status(registration) |
|
|
|
|
|
return :unregistered if registration.nil? || registration.user.firstname.blank? || registration.city.blank? |
|
|
|
|
|
return :registered if registration.housing.present? || (registration.can_provide_housing && registration.housing_data.present? && registration.housing_data['availability'].present?) |
|
|
|
|
|
return :preregistered |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
def sortable(objects, id = 'id', url: nil, &block) |
|
|
def sortable(objects, id = 'id', url: nil, &block) |
|
|
result = '<ul class="sortable sortable-' + objects[0].class.name.underscore.gsub('_', '-') + (url ? ('" data-url="' + url) : '') + '" data-id="' + id + '">' |
|
|
result = '<ul class="sortable sortable-' + objects[0].class.name.underscore.gsub('_', '-') + (url ? ('" data-url="' + url) : '') + '" data-id="' + id + '">' |
|
|
objects.each_index do |i| |
|
|
objects.each_index do |i| |
|
@ -902,7 +908,7 @@ module ApplicationHelper |
|
|
end |
|
|
end |
|
|
when :pre_registered |
|
|
when :pre_registered |
|
|
ConferenceRegistration.where(conference_id: conference.id).each do | r | |
|
|
ConferenceRegistration.where(conference_id: conference.id).each do | r | |
|
|
users << r.user if ((r.steps_completed || []).include? 'contact_info') && r.user.present? && r.is_attending != 'n' |
|
|
users << r.user if registration_status(r) == :preregistered && r.is_attending != 'n' |
|
|
end |
|
|
end |
|
|
when :workshop_facilitators |
|
|
when :workshop_facilitators |
|
|
user_hash = {} |
|
|
user_hash = {} |
|
@ -914,7 +920,7 @@ module ApplicationHelper |
|
|
users = user_hash.values |
|
|
users = user_hash.values |
|
|
when :unregistered |
|
|
when :unregistered |
|
|
ConferenceRegistration.where(conference_id: conference.id).each do | r | |
|
|
ConferenceRegistration.where(conference_id: conference.id).each do | r | |
|
|
users << r.user unless ((r.steps_completed || []).include? (conference.registration_status == :open ? 'questions' : 'contact_info')) || r.user.nil? || r.is_attending == 'n' |
|
|
users << r.user if registration_status(r) == :unregistered && r.is_attending != 'n' |
|
|
end |
|
|
end |
|
|
when :housing_providers |
|
|
when :housing_providers |
|
|
ConferenceRegistration.where(conference_id: conference.id, can_provide_housing: true).each do | r | |
|
|
ConferenceRegistration.where(conference_id: conference.id, can_provide_housing: true).each do | r | |
|
@ -1101,7 +1107,6 @@ module ApplicationHelper |
|
|
return :other_space |
|
|
return :other_space |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
# xxx |
|
|
|
|
|
return :other_host |
|
|
return :other_host |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|