From 6bdb7b35f0b91ec9bc2b5e5107beef31792331d9 Mon Sep 17 00:00:00 2001 From: Robert Waltemath Date: Mon, 10 Jun 2013 11:37:59 +0200 Subject: [PATCH] Showing/allowing multiple suppliers per shared supplier in shared-supplier-listing. --- app/views/suppliers/shared_suppliers.haml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/suppliers/shared_suppliers.haml b/app/views/suppliers/shared_suppliers.haml index 2de9234d..0c060582 100644 --- a/app/views/suppliers/shared_suppliers.haml +++ b/app/views/suppliers/shared_suppliers.haml @@ -22,7 +22,9 @@ %td= shared_supplier.note %td= shared_supplier.delivery_days %td - - if shared_supplier.supplier + - if shared_supplier.suppliers %i.icon-ok + = '(' + shared_supplier.suppliers.map{|s| s.name}.join(', ') + ')' + = link_to "abonnieren", new_supplier_path(:shared_supplier_id => shared_supplier), class: 'btn' - else - = link_to "abonnieren", new_supplier_path(:shared_supplier_id => shared_supplier), class: 'btn' \ No newline at end of file + = link_to "abonnieren", new_supplier_path(:shared_supplier_id => shared_supplier), class: 'btn'