2013-10-03 14:07:03 +02:00
|
|
|
- title t('.title')
|
2009-01-06 11:49:19 +01:00
|
|
|
|
2013-04-08 01:00:49 +02:00
|
|
|
= form_tag update_synchronized_supplier_articles_path(@supplier) do
|
2013-03-22 00:20:30 +01:00
|
|
|
%h2= t '.outlist.title'
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
|
|
|
- unless @outlisted_articles.empty?
|
2013-03-22 00:20:30 +01:00
|
|
|
= t('.outlist.body').html_safe
|
2009-01-06 11:49:19 +01:00
|
|
|
%ul
|
|
|
|
- for article in @outlisted_articles
|
|
|
|
%li
|
|
|
|
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
|
|
|
|
= article.name
|
2013-04-08 01:00:49 +02:00
|
|
|
- if article.in_open_order
|
2014-02-06 10:15:20 +01:00
|
|
|
.alert= t '.outlist.alert_used', article: article.name
|
2009-01-06 11:49:19 +01:00
|
|
|
- else
|
2013-03-22 00:20:30 +01:00
|
|
|
%i= t '.outlist.body_skip'
|
2014-01-24 22:20:29 +01:00
|
|
|
- if @ignored_article_count > 0
|
|
|
|
%i= t '.outlist.body_ignored', count: @ignored_article_count
|
2009-01-06 11:49:19 +01:00
|
|
|
%hr/
|
2013-03-22 00:20:30 +01:00
|
|
|
%h2= t '.update.title'
|
2009-01-06 11:49:19 +01:00
|
|
|
%p
|
|
|
|
%i
|
2013-10-03 14:07:03 +02:00
|
|
|
= t '.update.update_msg', count: @updated_articles.size
|
|
|
|
= t '.update.body'
|
2013-06-16 15:10:50 +02:00
|
|
|
%table.table
|
|
|
|
%thead
|
|
|
|
%tr
|
2013-10-03 16:03:13 +02:00
|
|
|
%th= heading_helper Article, :name
|
|
|
|
%th= heading_helper Article, :note
|
|
|
|
%th= heading_helper Article, :manufacturer
|
|
|
|
%th= heading_helper Article, :origin
|
|
|
|
%th= heading_helper Article, :unit
|
|
|
|
%th= heading_helper Article, :unit_quantity, short: true
|
|
|
|
%th= heading_helper Article, :price
|
|
|
|
%th= heading_helper Article, :tax
|
|
|
|
%th= heading_helper Article, :deposit
|
|
|
|
%th= heading_helper Article, :article_category
|
2013-06-16 15:10:50 +02:00
|
|
|
%tbody
|
|
|
|
- @updated_articles.each do |updated_article, attrs|
|
|
|
|
- article = Article.find(updated_article.id)
|
|
|
|
%tr{:style => 'color:grey'}
|
|
|
|
%td= article.name
|
|
|
|
%td= article.note
|
|
|
|
%td= article.manufacturer
|
|
|
|
%td= article.origin
|
|
|
|
%td= article.unit
|
|
|
|
%td= article.unit_quantity
|
|
|
|
%td= article.price
|
|
|
|
%td= article.tax
|
|
|
|
%td= article.deposit
|
|
|
|
%td= article.article_category.name if article.article_category
|
2009-01-06 11:49:19 +01:00
|
|
|
%tr
|
2013-06-16 15:10:50 +02:00
|
|
|
= fields_for 'articles[]', updated_article do |form|
|
|
|
|
%td{:style => highlight_new(attrs, :name)}
|
|
|
|
= form.text_field 'name', :size => 0
|
|
|
|
= form.hidden_field 'shared_updated_on'
|
|
|
|
%td{:style => highlight_new(attrs, :note)}= form.text_field 'note', class: 'input-small'
|
|
|
|
%td{:style => highlight_new(attrs, :manufacturer)}= form.text_field 'manufacturer', class: 'input-small'
|
|
|
|
%td{:style => highlight_new(attrs, :origin)}= form.text_field 'origin', class: 'input-mini'
|
|
|
|
%td{:style => highlight_new(attrs, :unit)}= form.text_field 'unit', class: 'input-mini'
|
|
|
|
%td{:style => highlight_new(attrs, :unit_quantity)}= form.text_field 'unit_quantity', class: 'input-mini'
|
|
|
|
%td{:style => highlight_new(attrs, :price)}= form.text_field 'price', class: 'input-mini'
|
|
|
|
%td{:style => highlight_new(attrs, :tax), class: 'input-append'}
|
|
|
|
= form.text_field 'tax', class: 'input-mini'
|
|
|
|
%span.add-on %
|
|
|
|
%td{:style => highlight_new(attrs, :deposit)}= form.text_field 'deposit', class: 'input-mini'
|
|
|
|
%td= form.select :article_category_id, ArticleCategory.all.map {|a| [ a.name, a.id ] },
|
|
|
|
{include_blank: true}, class: 'input-small'
|
2009-01-06 11:49:19 +01:00
|
|
|
%hr/
|
|
|
|
= hidden_field 'supplier', 'id'
|
2013-03-22 00:20:30 +01:00
|
|
|
= submit_tag t('.submit'), class: 'btn btn-primary'
|
2013-04-04 02:49:52 +02:00
|
|
|
= link_to t('ui.or_cancel'), supplier_articles_path(@supplier)
|