foodsoft/app/views/deliveries/_stock_article_for_adding.html.haml

14 lines
1 KiB
Text
Raw Permalink Normal View History

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 )
%tr{:id => "stock_article_#{article.id}", :class => css_class}
%td= article.name
%td{:data => {:toggle => :tooltip, :title => "#{render(:partial => 'shared/article_price_info', :locals => {:article => article})}"}}= number_to_currency article.price
%td= article.unit
%td= article.article_category.name
%td
= 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'
= 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