2013-03-09 16:46:33 +01:00
|
|
|
%tr{class: row_classes(article)}[article]
|
2011-05-19 19:49:37 +02:00
|
|
|
%td= check_box_tag 'selected_articles[]', article.id.to_s, false, {:id => "checkbox_#{article.id}", 'data-ignore-onchange' => true}
|
|
|
|
%td{'data-check-this' => "#checkbox_#{article.id}", :class => 'click-me'}= article.name
|
|
|
|
%td= article.origin
|
|
|
|
%td= truncate(article.article_category.name, :length => 11) if article.article_category
|
|
|
|
%td= article.unit
|
|
|
|
%td= truncate(article.note, :length => 11)
|
|
|
|
%td= article.unit_quantity
|
|
|
|
%td{:class => "currency"}
|
2013-03-09 00:40:07 +01:00
|
|
|
%acronym{:title => t('.last_update', last_update: format_date(article.updated_at), gross_price: number_to_currency(article.gross_price))}
|
2011-05-19 19:49:37 +02:00
|
|
|
= number_to_currency(article.price)
|
|
|
|
%td= number_to_percentage(article.tax) if article.tax != 0
|
|
|
|
%td= number_to_currency(article.deposit) if article.deposit != 0
|
2013-03-09 00:40:07 +01:00
|
|
|
%td= link_to t('ui.edit'), edit_supplier_article_path(@supplier, article),
|
2012-10-28 18:03:50 +01:00
|
|
|
:remote => true, class: 'btn btn-mini'
|
2013-03-09 00:40:07 +01:00
|
|
|
%td= link_to t('ui.delete'), [@supplier, article],
|
2016-03-04 23:13:28 +01:00
|
|
|
:method => :delete, :data => {:confirm => t('ui.confirm_delete', name: article.name)}, :remote => true, class: 'btn btn-mini btn-danger'
|