foodsoft/app/views/suppliers/show.haml

56 lines
2.1 KiB
Text
Raw Normal View History

2012-10-17 20:45:52 +02:00
- title @supplier.name
2009-01-06 11:49:19 +01:00
2012-10-17 20:45:52 +02:00
.row-fluid
.span6
2009-01-18 17:42:51 +01:00
- if shared_supplier = @supplier.shared_supplier
2012-10-17 20:45:52 +02:00
.alert.alert-info
2013-02-07 16:30:47 +01:00
= t 'suppliers.shared_supplier_note'
2009-01-18 17:42:51 +01:00
2012-10-17 20:45:52 +02:00
%dl.dl-horizontal
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.address') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.address
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.phone') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.phone
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.phone2') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.phone2
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.fax') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.fax
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.email') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.email
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.url') + ':'
%dd= link_to @supplier.url, @supplier.url
%dt= t('simple_form.labels.supplier.contact_person') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.contact_person
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.customer_number') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.customer_number
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.delivery_days') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.delivery_days
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.order_howto') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.order_howto
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.note') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.note
2013-02-07 16:30:47 +01:00
%dt= t('simple_form.labels.supplier.min_order_quantity') + ':'
2012-10-17 20:45:52 +02:00
%dd= @supplier.min_order_quantity
.clearfix
2009-01-18 17:42:51 +01:00
- if @current_user.role_suppliers?
2012-10-17 20:45:52 +02:00
.form-actions
2013-02-07 16:30:47 +01:00
= link_to t('ui.edit'), edit_supplier_path(@supplier), class: 'btn'
= link_to t('ui.delete'), @supplier, :confirm => t('.confirm_delete'), :method => :delete, class: 'btn btn-danger'
2009-01-18 17:42:51 +01:00
2012-10-17 20:45:52 +02:00
.span6
2013-02-07 16:30:47 +01:00
%h2= t '.last_deliveries'
2012-10-17 20:45:52 +02:00
%table.table.table-horizontal
%thead
2009-01-18 17:42:51 +01:00
%tr
2013-02-07 16:30:47 +01:00
%th= t 'simple_form.labels.defaults.date'
%th= t 'simple_form.labels.defaults.amount'
2012-10-17 20:45:52 +02:00
%tbody
- for delivery in @deliveries
%tr
%td= link_to delivery.delivered_on, [@supplier, delivery]
%td= link_to_invoice(delivery)
.form-actions
2013-02-07 16:30:47 +01:00
= link_to t('.new_delivery'), new_supplier_delivery_path(@supplier), class: 'btn'
= link_to t('.show_deliveries'), supplier_deliveries_path(@supplier)