Show receive button in grey when already received

This commit is contained in:
wvengen 2015-04-10 21:25:09 +02:00
parent 7974d2ec81
commit bc1eb3bc44
3 changed files with 16 additions and 4 deletions

View file

@ -54,8 +54,7 @@
%td= truncate(order.note)
%td
- unless order.stockit?
-# TODO btn-success class only if not received before
= link_to t('.action_receive'), receive_order_path(order), class: 'btn btn-small btn-success'
= receive_button order
%td
= link_to t('ui.copy'), new_order_path(order_id: order, supplier_id: order.supplier), class: 'btn btn-small'

View file

@ -64,8 +64,7 @@
data: {confirm: t('.confirm_end', order: @order.name)}
= link_to t('ui.edit'), edit_order_path(@order), class: 'btn'
- elsif not @order.closed? and not @order.stockit?
-# TODO btn-success class only if not received before
= link_to t('orders.index.action_receive'), receive_order_path(@order), class: 'btn btn-success'
= receive_button @order
- unless @order.closed?
= link_to t('ui.delete'), @order, data: {confirm: t('.confirm_delete')}, method: :delete,
class: 'btn btn-danger'