From c75738893efbdf31af07040ca4e3c7f0f0864657 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 18 Jan 2013 14:35:06 +1100 Subject: [PATCH] Display supplier name on products for distribution --- app/assets/stylesheets/admin/openfoodweb.css.scss | 4 ++++ app/views/admin/enterprises/index.rep | 1 + .../_exchange_distributed_products_form.html.haml | 1 + 3 files changed, 6 insertions(+) diff --git a/app/assets/stylesheets/admin/openfoodweb.css.scss b/app/assets/stylesheets/admin/openfoodweb.css.scss index 1fb1302593..c1becb6263 100644 --- a/app/assets/stylesheets/admin/openfoodweb.css.scss +++ b/app/assets/stylesheets/admin/openfoodweb.css.scss @@ -53,6 +53,10 @@ form.order_cycle { .exchange-product-details { clear: both; margin-bottom: 1em; + + .supplier { + font-weight: bold; + } } .exchange-product-variant { diff --git a/app/views/admin/enterprises/index.rep b/app/views/admin/enterprises/index.rep index ef7b395b1c..beaceef8a4 100644 --- a/app/views/admin/enterprises/index.rep +++ b/app/views/admin/enterprises/index.rep @@ -4,6 +4,7 @@ r.list_of :enterprises, @collection do r.list_of :supplied_products do |product| r.element :name + r.element :supplier_name, product.supplier.andand.name r.element :image_url, product.images.present? ? product.images.first.attachment.url(:mini) : nil r.element :master_id, product.master.id r.list_of :variants do |variant| diff --git a/app/views/admin/order_cycles/_exchange_distributed_products_form.html.haml b/app/views/admin/order_cycles/_exchange_distributed_products_form.html.haml index b62f1111c0..3d083eb2d7 100644 --- a/app/views/admin/order_cycles/_exchange_distributed_products_form.html.haml +++ b/app/views/admin/order_cycles/_exchange_distributed_products_form.html.haml @@ -1,6 +1,7 @@ %td{:colspan => 3} .exchange-product{'ng-repeat' => 'product in supplied_products | filter:productSuppliedToOrderCycle'} .exchange-product-details + .supplier {{ product.supplier_name }} = check_box_tag 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}', 1, 1, 'ng-hide' => 'product.variants', 'ng-model' => 'exchange.variants[product.master_id]', 'id' => 'order_cycle_outgoing_exchange_{{ $parent.$index }}_variants_{{ product.master_id }}' %img{'ng-src' => '{{ product.image_url }}'} {{ product.name }}