Fixed articles views.
This commit is contained in:
parent
fd361090b4
commit
f30e57dd49
18 changed files with 159 additions and 153 deletions
|
|
@ -1,25 +1,33 @@
|
|||
%p= pagination_links_remote @articles, :per_page => 10, :params => {:search => params[:search]}
|
||||
%table.list
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Herkunft
|
||||
%th Hersteller
|
||||
%th Notiz
|
||||
%th{:style => "width:4em"} Preis
|
||||
%th Einheit
|
||||
%th GebGröße
|
||||
%th
|
||||
%tbody
|
||||
- for article in @articles
|
||||
%tr{:class => cycle('even','odd', :name => 'import_search_results')}
|
||||
%td= highlight article.name, params[:search][:name_contains_all]
|
||||
%td= article.origin
|
||||
%td= article.manufacturer
|
||||
%td= article.note
|
||||
%td= number_to_currency(article.price)
|
||||
%td= article.unit
|
||||
%td= article.unit_quantity
|
||||
%td= link_to 'importieren', import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||
:remote => true
|
||||
|
||||
- if @articles.empty?
|
||||
%p Keine Artikel gefunden
|
||||
- else
|
||||
= pagination_links_remote @articles, :params => {:search => search_params}
|
||||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Herkunft
|
||||
%th Hersteller
|
||||
%th Notiz
|
||||
%th{:style => "width:4em"} Preis
|
||||
%th Einheit
|
||||
%th GebGröße
|
||||
%th
|
||||
%tbody
|
||||
- for article in @articles
|
||||
%tr
|
||||
%td= highlight article.name, params[:search][:name_contains_all]
|
||||
%td= article.origin
|
||||
%td= article.manufacturer
|
||||
%td= article.note
|
||||
%td= number_to_currency(article.price)
|
||||
%td= article.unit
|
||||
%td= article.unit_quantity
|
||||
%td
|
||||
- logger.debug "[debug] #{article.attributes.inspect}"
|
||||
- if @supplier.articles.where(order_number: article.number).exists?
|
||||
%i.icon-ok
|
||||
schon importiert
|
||||
- else
|
||||
= link_to 'importieren', import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||
:remote => true, class: 'btn btn-small btn-success'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue