Added house rules to housing admin and review
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user