Browse Source

Merge branch 'master' of https://github.com/bikebike/BikeBike

development
Godwin 8 years ago
parent
commit
32474fae1c
  1. 6
      app/controllers/application_controller.rb
  2. 2
      app/controllers/conferences_controller.rb
  3. 2
      config/locales/en.yml

6
app/controllers/application_controller.rb

@ -342,7 +342,7 @@ class ApplicationController < LinguaFrancaApplicationController
template = 'login_confirmation_sent' template = 'login_confirmation_sent'
@page_title ||= 'page_titles.403.Please_Check_Email' @page_title ||= 'page_titles.403.Please_Check_Email'
if (conference = /^\/conferences\/(\w+)\/register\/?$/.match(request.referrer.gsub(/^https?:\/\/.*?\//, '/'))) if (request.present? && request.referrer.present? && conference = /^\/conferences\/(\w+)\/register\/?$/.match(request.referrer.gsub(/^https?:\/\/.*?\//, '/')))
@this_conference = Conference.find_by!(slug: conference[1]) @this_conference = Conference.find_by!(slug: conference[1])
@banner_image = @this_conference.cover_url @banner_image = @this_conference.cover_url
template = 'conferences/email_confirm' template = 'conferences/email_confirm'
@ -547,7 +547,7 @@ class ApplicationController < LinguaFrancaApplicationController
end end
last_event = time last_event = time
end end
@schedule[day][:num_locations] = data[:locations].size @schedule[day][:num_locations] = (data[:locations] || []).size
end end
@schedule.deep_dup.each do | day, data | @schedule.deep_dup.each do | day, data |
@ -572,7 +572,7 @@ class ApplicationController < LinguaFrancaApplicationController
@schedule.each do | day, data | @schedule.each do | day, data |
@schedule[day][:times] = data[:times].sort.to_h @schedule[day][:times] = data[:times].sort.to_h
@schedule[day][:locations][0] = :add if @schedule[day][:locations].size > 0 @schedule[day][:locations][0] = :add if (@schedule[day][:locations] || []).size > 0
data[:times].each do | time, time_data | data[:times].each do | time, time_data |
if time_data[:type] == :workshop && time_data[:item].present? && time_data[:item][:workshops].present? if time_data[:type] == :workshop && time_data[:item].present? && time_data[:item][:workshops].present?

2
app/controllers/conferences_controller.rb

@ -459,8 +459,10 @@ class ConferencesController < ApplicationController
@bikes += 1 if r.bike == 'yes' @bikes += 1 if r.bike == 'yes'
if r.food.present?
@food[r.food.to_sym] += 1 @food[r.food.to_sym] += 1
@food[:all] += 1 @food[:all] += 1
end
if r.registration_fees_paid.present? && r.registration_fees_paid > 0 if r.registration_fees_paid.present? && r.registration_fees_paid > 0
@donation_count += 1 @donation_count += 1

2
config/locales/en.yml

@ -1309,6 +1309,8 @@ en:
deschedule: De-Schedule deschedule: De-Schedule
reschedule: Reschedule reschedule: Reschedule
schedule_workshop: Schedule schedule_workshop: Schedule
delete_block: Delete
update_block: Update
aria: aria:
remove_interest: Click if you are no longer interested in this workshop remove_interest: Click if you are no longer interested in this workshop
show_interest: Click if you are interested in this workshop show_interest: Click if you are interested in this workshop

Loading…
Cancel
Save