foodsoft/app/views/suppliers/index.haml

29 lines
1.1 KiB
Text
Raw Normal View History

2012-10-17 20:45:52 +02:00
- title "Lieferanten"
2012-10-17 20:45:52 +02:00
%p
= link_to 'Neue Lieferantin anlegen', new_supplier_path, class: 'btn btn-primary'
oder
= link_to 'importiere', shared_suppliers_suppliers_path
aus der externen Artikeldatenbank.
%table.table.table-striped
%thead
%tr
%th Name
%th Telefon
%th Kunden-Nr
%th
%th
%th
%tbody
- for supplier in @suppliers
2009-01-18 17:42:51 +01:00
%tr
2012-10-17 20:45:52 +02:00
%td= link_to h(supplier.name) , supplier
%td= supplier.phone
%td= supplier.customer_number
%td= link_to "Artikel (#{supplier.articles.count})", supplier_articles_path(supplier)
%td= link_to "im Lager (#{supplier.stock_articles.count})", stock_articles_path
%td= link_to "Lieferungen (#{supplier.deliveries.count})", supplier_deliveries_path(supplier)
%td
= link_to "Bearbeiten", edit_supplier_path(supplier), class: 'btn btn-mini'
= link_to "Löschen", supplier_path(supplier), method: :delete,
confirm: "Achtung, willst Du wirklich den Lieferanten #{supplier.name} löschen?", class: 'btn btn-mini btn-danger'