Development (#250)
* Fixed fonts * Fixed assets * Fixed logo in emails * Switched to immediate email delivery * Fixed prod emails and added deployment tasks * Fixed deployments * Updated README * Added Bike Collectives Core to README * Fixed issue with map loading * Fixed issue with map loading * Added map JSON data to assets precompilation * Fixed error sending to conference administrators * Let error report signature wrap * Fixed backtrace in error reports * Fixed backtrace in error reports * Moved pronoun heading to make it more obvoius I moved the "Pronoun" heading directly above the input field. It turned out that a lot of users were entering "He or "She" in the name field, I believe that was because of the placement of the "Pronoun" heading. I also needed to remove the optional warning but I'm hoping that won't cause problems. * Added an error message when no email address is used on login * Fixed select guest table * Added house rules to housing admin and review * Edit workshop locale warning
This commit is contained in:
@@ -112,7 +112,7 @@ module AdminHelper
|
||||
end
|
||||
|
||||
def get_housing_match(host, guest, space)
|
||||
housing_data = guest.housing_data || []
|
||||
housing_data = guest.housing_data || {}
|
||||
|
||||
if housing_data['host'].present?
|
||||
if housing_data['host'] == host.id
|
||||
|
||||
@@ -137,7 +137,8 @@ module FormHelper
|
||||
|
||||
if options[:warning].present?
|
||||
description_id ||= "#{id}-desc"
|
||||
html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info')
|
||||
# html += content_tag(:div, _(options[:warning], :s, 2), id: description_id, class: 'warning-info')
|
||||
html += status_bubble(_(options[:warning], :s, 2), :warning, id: description_id)
|
||||
end
|
||||
|
||||
aria = {}
|
||||
|
||||
@@ -85,8 +85,14 @@ module GeocoderHelper
|
||||
end
|
||||
|
||||
def location_link(location)
|
||||
return '' unless location.present? && location.address.present?
|
||||
content_tag(:a, (_!location.address), href: "http://www.google.com/maps/place/#{location.latitude},#{location.longitude}")
|
||||
return '' unless location.present?
|
||||
address = if location.is_a?(Location)
|
||||
location.street
|
||||
else
|
||||
location.address
|
||||
end
|
||||
return '' unless address.present?
|
||||
content_tag(:a, (_!address), href: "http://www.google.com/maps/place/#{location.latitude},#{location.longitude}")
|
||||
end
|
||||
|
||||
def same_city?(location1, location2)
|
||||
|
||||
@@ -112,20 +112,20 @@ module WidgetsHelper
|
||||
@housing_data[id][:guest_data][guest_id][:errors].each do |error, value|
|
||||
if value.is_a?(Array)
|
||||
value.each do |v|
|
||||
status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: v))
|
||||
status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: v).html_safe)
|
||||
end
|
||||
else
|
||||
status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: value))
|
||||
status_html += content_tag(:li, _("errors.messages.housing.space.#{error.to_s}", vars: value).html_safe)
|
||||
end
|
||||
end
|
||||
|
||||
@housing_data[id][:guest_data][guest_id][:warnings].each do |error, value|
|
||||
if value.is_a?(Array)
|
||||
value.each do |v|
|
||||
status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", v))
|
||||
status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", v).html_safe)
|
||||
end
|
||||
else
|
||||
status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", vars: value))
|
||||
status_html += content_tag(:li, _("warnings.messages.housing.space.#{error.to_s}", vars: value).html_safe)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -326,4 +326,23 @@ module WidgetsHelper
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def strong(text)
|
||||
content_tag(:strong, text)
|
||||
end
|
||||
|
||||
def phone_link(number)
|
||||
content_tag(:a, number, href: "tel:#{number}")
|
||||
end
|
||||
|
||||
def email_link(email)
|
||||
content_tag(:a, email, href: "mailto:#{email}")
|
||||
end
|
||||
|
||||
def status_bubble(text, status, attributes = {})
|
||||
attributes[:class] ||= []
|
||||
attributes[:class] = [attributes[:class]] unless attributes[:class].is_a?(Array)
|
||||
attributes[:class] << "#{status}-info"
|
||||
content_tag(:div, text.html_safe, attributes)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user