From 8bac32ebdfdf0c0fb1908627f7950eb8ff6ca094 Mon Sep 17 00:00:00 2001 From: Will Marshall Date: Fri, 14 Mar 2014 10:41:18 +1100 Subject: [PATCH] Adding distribution info to the About panel --- app/views/shop/shop/_about_us.html.haml | 16 ++-------------- app/views/shop/shop/_contact.html.haml | 18 ++++++++++++++++++ app/views/shop/shop/show.html.haml | 6 +----- 3 files changed, 21 insertions(+), 19 deletions(-) create mode 100644 app/views/shop/shop/_contact.html.haml diff --git a/app/views/shop/shop/_about_us.html.haml b/app/views/shop/shop/_about_us.html.haml index 78d9390cd5..62eed87c86 100644 --- a/app/views/shop/shop/_about_us.html.haml +++ b/app/views/shop/shop/_about_us.html.haml @@ -5,18 +5,6 @@ .content{"data-section-content" => ""} %img.about.right{src: @distributor.promo_image.url(:large)} %p= @distributor.long_description.andand.html_safe - + .panel - %p - %strong E - %a{href: "mailto:#{@distributor.email}"}= @distributor.email - - - unless @distributor.website.blank? - %strong W - %a{href: @distributor.website}= @distributor.website - - = [@distributor.address.address1, @distributor.address.address2].join ", " - %br - = @distributor.address.city - = @distributor.address.state - = @distributor.address.zipcode + = @distributor.distributor_info.html_safe diff --git a/app/views/shop/shop/_contact.html.haml b/app/views/shop/shop/_contact.html.haml new file mode 100644 index 0000000000..77232f2853 --- /dev/null +++ b/app/views/shop/shop/_contact.html.haml @@ -0,0 +1,18 @@ +%section + %p.title.avenir{"data-section-title" => ""} + %a{href: "#contact"} Contact + .content{"data-section-content" => ""} + .panel + %p + %strong E + %a{href: "mailto:#{@distributor.email}"}= @distributor.email + + - unless @distributor.website.blank? + %strong W + %a{href: @distributor.website}= @distributor.website + + = [@distributor.address.address1, @distributor.address.address2].join ", " + %br + = @distributor.address.city + = @distributor.address.state + = @distributor.address.zipcode diff --git a/app/views/shop/shop/show.html.haml b/app/views/shop/shop/show.html.haml index 1f6ed6defd..09a2b05491 100644 --- a/app/views/shop/shop/show.html.haml +++ b/app/views/shop/shop/show.html.haml @@ -21,12 +21,8 @@ = render 'shop/shop/about_us' = render 'shop/shop/producers' = render 'shop/shop/groups' + = render 'shop/shop/contact' - %section - %p.title.avenir{"data-section-title" => ""} - %a{href: "#contact"} Contact - .content{"data-section-content" => ""} - %p Contact %products.row = render partial: "shop/shop/products"