2013-12-07 16:57:53 +01:00
|
|
|
- disable_delivery_action = ( @delivery and @delivery.includes_article? article )
|
|
|
|
- css_class = ( disable_delivery_action ) ? ( 'unavailable' ) : ( false )
|
|
|
|
- deliver_button_disabled = ( disable_delivery_action ) ? ( 'disabled' ) : ( false )
|
|
|
|
|
2013-06-13 23:33:24 +02:00
|
|
|
%tr{:id => "stock_article_#{article.id}", :class => css_class}
|
2013-07-16 22:01:56 +02:00
|
|
|
%td= article.name
|
2020-03-23 15:24:49 +01:00
|
|
|
%td{:data => {:toggle => :tooltip, :title => "#{render(:partial => 'shared/article_price_info', :locals => {:article => article})}"}}= number_to_currency article.price
|
2013-07-08 22:19:27 +02:00
|
|
|
%td= article.unit
|
2013-07-16 22:01:56 +02:00
|
|
|
%td= article.article_category.name
|
2013-06-13 23:33:24 +02:00
|
|
|
%td
|
2013-12-07 16:42:25 +01:00
|
|
|
= link_to t('.action_edit'), edit_stock_article_path(article), remote: true, class: 'btn btn-mini'
|
|
|
|
= link_to t('.action_other_price'), stock_article_copy_path(article), remote: true, class: 'btn btn-mini'
|
2013-07-07 14:18:18 +02:00
|
|
|
= link_to t('.action_add_to_delivery'), add_stock_change_supplier_deliveries_path(@supplier, :stock_article_id => article.id), :method => :post, remote: true, class: 'button-add-stock-change btn btn-mini btn-primary', disabled: deliver_button_disabled
|