Skip to content

Commit

Permalink
Fixes #415 - adds vanity number
Browse files Browse the repository at this point in the history
Fixes #415 - adds vanity number to phone partial and test spec.
  • Loading branch information
anselmbradford committed Nov 14, 2014
1 parent 54a1778 commit 7be6236
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 11 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/components/_phone.css.scss
Expand Up @@ -10,4 +10,8 @@
font-size: $font_size_90;
color: $greyscale_midtone;
}

.vanity-number {
display: block;
}
}
27 changes: 16 additions & 11 deletions app/views/component/detail/_phone.html.haml
Expand Up @@ -7,14 +7,19 @@
- if phone.present?
%section.phone.icon-text-block{ itemscope: '', itemtype: 'http://schema.org/ContactPoint' }
%i{ class: phone_icon_for(phone.number_type) }
%span.annotated-text-block
%span{ itemprop: phone_microdata_for(phone.number_type) }
= format_phone(phone.number)
- if phone.extension.present?
%span.phone-extension
%span.delimiter
= SETTINGS[:phone_extension_delimiter]
%span.extension
= phone.extension
- if show_phone_type_and_department == true
= render 'component/detail/phone_type_and_department', phone: phone
%span
- if phone.vanity_number.present?
%span
%span.vanity-number
= phone.vanity_number
%span.annotated-text-block
%span.number{ itemprop: phone_microdata_for(phone.number_type) }
= format_phone(phone.number)
- if phone.extension.present?
%span.phone-extension
%span.delimiter
= SETTINGS[:phone_extension_delimiter]
%span.extension
= phone.extension
- if show_phone_type_and_department == true
= render 'component/detail/phone_type_and_department', phone: phone
4 changes: 4 additions & 0 deletions spec/features/details/location_details_spec.rb
Expand Up @@ -148,6 +148,10 @@ def body_for(name, url)
expect(page).to have_link('www.example.org')
end

it 'includes vanity number' do
expect(page).to have_content('222-555-INFO')
end

it 'includes Physical Address' do
expect(page).to have_content('Avenue of the fellows')
end
Expand Down

0 comments on commit 7be6236

Please sign in to comment.