Replace distributor info box on product details and checkout pages with rich text field

This commit is contained in:
Rohan Mitchell
2013-04-26 13:30:21 +10:00
parent fb999732ee
commit 63768df3d7
4 changed files with 35 additions and 23 deletions

View File

@@ -1,23 +1,24 @@
%h2= distributor.name
%p
%strong Address:
%br/
= render 'spree/shared/address', :address => distributor.address
%p
%strong Next collection time:
%br/
= distributor.next_collection_at
%p
%strong Regular collection times:
%br/
= distributor.pickup_times
%p
%strong Contact:
%br/
= distributor.contact
%br/
= "Phone: #{distributor.phone}"
%br/
= "Email: #{distributor.email}"
%p= distributor.description
%p= link_to distributor.website, distributor.website if distributor.website
.distributor-details{'data-hook' => 'distributor-details'}
%h2= distributor.name
%p
%strong Address:
%br/
= render 'spree/shared/address', :address => distributor.address
%p
%strong Next collection time:
%br/
= distributor.next_collection_at
%p
%strong Regular collection times:
%br/
= distributor.pickup_times
%p
%strong Contact:
%br/
= distributor.contact
%br/
= "Phone: #{distributor.phone}"
%br/
= "Email: #{distributor.email}"
%p= distributor.description
%p= link_to distributor.website, distributor.website if distributor.website

View File

@@ -0,0 +1,5 @@
.distributor-details .next-collection-at {
font-size: 20px;
font-weight: bold;
color: #de790c;
}

View File

@@ -0,0 +1,4 @@
/ replace_contents "[data-hook='distributor-details']"
%h2= distributor.name
= distributor.distributor_info.andand.html_safe
.next-collection-at= distributor.next_collection_at

View File

@@ -0,0 +1,2 @@
<!-- insert_bottom 'head' -->
<%= stylesheet_link_tag 'enterprises_distributor_info_rich_text_feature/application' %>