foodsoft/app/views/suppliers/index.haml
2013-03-16 17:57:38 +01:00

27 lines
No EOL
1.1 KiB
Text

- title "Lieferanten"
- content_for :actionbar do
= link_to 'Neue Lieferantin anlegen', new_supplier_path, class: 'btn btn-primary'
= link_to 'Lieferantin aus externer Datenbank importieren', shared_suppliers_suppliers_path, class: 'btn'
%table.table.table-striped
%thead
%tr
%th Name
%th Telefon
%th Kunden-Nr
%th
%th
%th
%tbody
- for supplier in @suppliers
%tr
%td= link_to h(supplier.name) , supplier
%td= supplier.phone
%td= supplier.customer_number
%td= link_to "Artikel (#{supplier.articles.undeleted.count})", supplier_articles_path(supplier)
%td= link_to "im Lager (#{supplier.stock_articles.undeleted.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'