diff --git a/app/views/shop/shop/_producers.html.haml b/app/views/shop/shop/_producers.html.haml new file mode 100644 index 0000000000..f59cb268c6 --- /dev/null +++ b/app/views/shop/shop/_producers.html.haml @@ -0,0 +1,9 @@ +%section + %p.title.avenir{"data-section-title" => ""} + %a{href: "#producers"} Our Producers + .content{"data-section-content" => ""} + %ul + - for producer in @producers + %li + %a{"data-reveal-id" => "producer_details_#{producer.id}"} + = producer.name diff --git a/app/views/shop/shop/_products.html.haml b/app/views/shop/shop/_products.html.haml index 26ab4d17b6..8387b9adc7 100644 --- a/app/views/shop/shop/_products.html.haml +++ b/app/views/shop/shop/_products.html.haml @@ -18,7 +18,8 @@ %div %h5 {{ product.name }} - {{ product.supplier.name }} + %a{"data-reveal-id" => "producer_details_{{product.supplier.id}}"} + {{ product.supplier.name }} %td.notes {{ product.notes | truncate:80 }} %td %span{"ng-hide" => "product.variants.length > 0"} {{ product.master.options_text }} diff --git a/app/views/shop/shop/show.html.haml b/app/views/shop/shop/show.html.haml index 5072576f6f..290c026bae 100644 --- a/app/views/shop/shop/show.html.haml +++ b/app/views/shop/shop/show.html.haml @@ -1,5 +1,4 @@ %shop.darkswarm{"ng-app" => "Shop"} - - content_for :order_cycle_form do %strong.avenir Ready for %select.avenir#order_cycle_id{"ng-model" => "order_cycle.order_cycle_id", @@ -12,6 +11,8 @@ %strong {{ order_cycle.orders_close_at | date_in_words }} = render partial: "shop/details" + -# This partial generates the producer detail popovers + = render partial: "shop/shop/producer_details" %tabs .row @@ -23,13 +24,7 @@ %img.about.right{src: @distributor.promo_image.url(:large)} %p= @distributor.long_description.andand.html_safe - %section - %p.title.avenir{"data-section-title" => ""} - %a{href: "#producers"} Our Producers - .content{"data-section-content" => ""} - %ul - - for producer in @producers - %li= producer.name + = render 'shop/shop/producers' %section %p.title.avenir{"data-section-title" => ""} @@ -45,6 +40,7 @@ %products.row = render partial: "shop/shop/products" + #footer %section.row = render partial: "shop/shop/contact_us"