Skip to content

Instantly share code, notes, and snippets.

@robdimarco
Last active August 29, 2015 14:02
Show Gist options
  • Save robdimarco/e0bd4e51c3328b66e31a to your computer and use it in GitHub Desktop.
Save robdimarco/e0bd4e51c3328b66e31a to your computer and use it in GitHub Desktop.
- if @profile.locations.empty?
.info-col.padding-sidegap10
%ul.unstyled
%li No Locations Specified
- elsif @profile.is_dynamic
.info-col
.alert.margin-topgap5.padding-gap10
%p.margin-gap0.dynamic-text
%span.inline-block You have chosen to display a dynamic serving area.
%br
%span.inline-block.padding-leftgap10
%b.italic
= nearest_location
%br
%span.inline-block Your public profile will NOT display your physical address.
- else
.info-col
- need_to_show_description_warning = true
- @profile.locations.each do |loc|
- if loc.mappable?
%p.margin-gap0.dynamic-text
%span.inline-block.padding-leftgap10
= loc.full_address('<br/>').html_safe
- if loc.phone_for_display.blank?
%br
No Phone Specified
- else
%br
= loc.formatted_phone
= loc.tracking_number_id? ? '(Tracking Number)' : ""
- else
.alert.margin-topgap5.padding-gap10
- if need_to_show_description_warning
- need_to_show_description_warning = false
%p.margin-gap0.dynamic-text
%span.inline-block You have chosen to display a location description instead of a physical address.
%br
%span.inline-block.padding-leftgap10
%b.italic
= loc.description
- if loc.phone_for_display.blank?
No Phone Specified
- else
%br
= loc.formatted_phone
= loc.tracking_number_id? ? '(Tracking Number)' : ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment