|
@ -216,13 +216,21 @@ module ApplicationHelper |
|
|
content_tag(:span, text.html_safe, id: id, class: 'screen-reader-text') |
|
|
content_tag(:span, text.html_safe, id: id, class: 'screen-reader-text') |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def url_for_locale(locale) |
|
|
def url_for_locale(locale, url = nil) |
|
|
|
|
|
unless url.present? |
|
|
new_params = params.merge({action: (params[:_original_action] || params[:action])}) |
|
|
new_params = params.merge({action: (params[:_original_action] || params[:action])}) |
|
|
new_params.delete(:_original_action) |
|
|
new_params.delete(:_original_action) |
|
|
|
|
|
|
|
|
return url_for(new_params.merge({lang: locale.to_s})) if Rails.env.development? || Rails.env.test? |
|
|
if Rails.env.development? || Rails.env.test? |
|
|
return "https://preview-#{locale.to_s}.bikebike.org#{url_for(new_params)}" if Rails.env.preview? |
|
|
url = url_for(new_params.merge({lang: locale.to_s})) |
|
|
"https://#{locale.to_s}.bikebike.org#{url_for(new_params)}" |
|
|
else |
|
|
|
|
|
url = url_for(new_params) |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
return url if Rails.env.development? || Rails.env.test? |
|
|
|
|
|
return "https://preview-#{locale.to_s}.bikebike.org#{url}" if Rails.env.preview? |
|
|
|
|
|
"https://#{locale.to_s}.bikebike.org#{url}" |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
def registration_steps(conference = @conference) |
|
|
def registration_steps(conference = @conference) |
|
|