improved shared database import ui
This commit is contained in:
parent
950480941a
commit
0014435663
8 changed files with 97 additions and 61 deletions
|
|
@ -11,22 +11,23 @@
|
|||
%th= heading_helper Article, :note
|
||||
%th{:style => "width:4em"}= heading_helper Article, :price
|
||||
%th= heading_helper Article, :unit
|
||||
%th= heading_helper Article, :unit_quantity, short: true
|
||||
%th
|
||||
%tbody
|
||||
- for article in @articles
|
||||
%tr
|
||||
%tr{id: "shared_article_#{article.id}"}
|
||||
%td= highlight article.name, params[:q][:name_cont_all]
|
||||
%td= article.origin
|
||||
%td= article.manufacturer
|
||||
%td= article.note
|
||||
%td{title: article.note}= truncate(article.note, length: 11)
|
||||
%td= number_to_currency(article.price)
|
||||
%td= article.unit
|
||||
%td= article.unit_quantity
|
||||
%td
|
||||
= article.unit
|
||||
- if article.unit_quantity > 1
|
||||
%span{style: 'color: grey'} × #{article.unit_quantity} #{pkg_helper_icon}
|
||||
%td.actions
|
||||
- logger.debug "[debug] #{article.attributes.inspect}"
|
||||
- if @supplier.articles.undeleted.where(order_number: article.number).exists?
|
||||
%i.icon-ok= t '.already_imported'
|
||||
- else
|
||||
= link_to t('.action_import'), import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||
:remote => true, class: 'btn btn-small btn-success'
|
||||
= link_to t('.action_import'), import_supplier_articles_path(@supplier, shared_article_id: article.id, direct: true),
|
||||
remote: true, class: 'btn btn-small btn-success'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue