Display supplier name on products for distribution

This commit is contained in:
Rohan Mitchell
2013-01-18 14:35:06 +11:00
parent 074d5715e7
commit c75738893e
3 changed files with 6 additions and 0 deletions

View File

@@ -53,6 +53,10 @@ form.order_cycle {
.exchange-product-details {
clear: both;
margin-bottom: 1em;
.supplier {
font-weight: bold;
}
}
.exchange-product-variant {

View File

@@ -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|

View File

@@ -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 }}