Improve upload form
This commit is contained in:
parent
16e9210035
commit
0d92007274
2 changed files with 80 additions and 18 deletions
|
@ -1,20 +1,72 @@
|
||||||
- title t('.title', supplier: @supplier.name)
|
- title t('.title', supplier: @supplier.name)
|
||||||
= t('.body').html_safe
|
|
||||||
%pre
|
%p= t '.text_1', supplier: @supplier.name
|
||||||
= [t('.fields.status'),
|
|
||||||
Article.human_attribute_name(:order_number),
|
%table.table.table-bordered
|
||||||
Article.human_attribute_name(:name),
|
%thead
|
||||||
Article.human_attribute_name(:note),
|
%tr
|
||||||
Article.human_attribute_name(:manufacturer),
|
%th= t '.field.status'
|
||||||
Article.human_attribute_name(:origin),
|
%th= Article.human_attribute_name(:order_number)
|
||||||
Article.human_attribute_name(:unit),
|
%th= Article.human_attribute_name(:name)
|
||||||
Article.human_attribute_name(:price),
|
%th= Article.human_attribute_name(:note)
|
||||||
Article.human_attribute_name(:tax),
|
%th= Article.human_attribute_name(:manufacturer)
|
||||||
Article.human_attribute_name(:deposit),
|
%th= Article.human_attribute_name(:origin)
|
||||||
Article.human_attribute_name(:unit_quantity),
|
%th= Article.human_attribute_name(:unit)
|
||||||
t('.fields.reserved'),
|
%th= Article.human_attribute_name(:price)
|
||||||
t('.fields.reserved'),
|
%th= Article.human_attribute_name(:tax)
|
||||||
Article.human_attribute_name(:article_category)].join(" | ")
|
%th= Article.human_attribute_name(:deposit)
|
||||||
|
%th= Article.human_attribute_name(:unit_quantity)
|
||||||
|
%th.muted= t '.fields.reserved'
|
||||||
|
%th.muted= t '.fields.reserved'
|
||||||
|
%th= Article.human_attribute_name(:article_category)
|
||||||
|
%tbody
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
%td 1234A
|
||||||
|
%td= t '.sample.walnuts'
|
||||||
|
%td
|
||||||
|
%td= t '.sample.supplier_1'
|
||||||
|
%td CA
|
||||||
|
%td 500 gr
|
||||||
|
%td 8.90
|
||||||
|
%td= FoodsoftConfig[:tax_default] || 6
|
||||||
|
%td 0
|
||||||
|
%td 6
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
%td= t '.sample.nuts'
|
||||||
|
%tr
|
||||||
|
%td x
|
||||||
|
%td 4321Z
|
||||||
|
%td= t '.sample.tomato_juice'
|
||||||
|
%td= t '.sample.organic'
|
||||||
|
%td= t '.sample.supplier_2'
|
||||||
|
%td IN
|
||||||
|
%td 1.5 l
|
||||||
|
%td 4.35
|
||||||
|
%td= FoodsoftConfig[:tax_default] || 6
|
||||||
|
%td 0
|
||||||
|
%td 1
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
%td= t '.sample.juices'
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
%td 4322Q
|
||||||
|
%td= t '.sample.tomato_juice'
|
||||||
|
%td= t '.sample.organic'
|
||||||
|
%td= t '.sample.supplier_3'
|
||||||
|
%td TR
|
||||||
|
%td 1.2 l
|
||||||
|
%td 4.02
|
||||||
|
%td= FoodsoftConfig[:tax_default] || 6
|
||||||
|
%td 0
|
||||||
|
%td 2
|
||||||
|
%td
|
||||||
|
%td
|
||||||
|
%td= t '.sample.juices'
|
||||||
|
|
||||||
|
%p= t '.text_2'
|
||||||
|
|
||||||
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
|
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
|
||||||
:html => { :multipart => true } do |f|
|
:html => { :multipart => true } do |f|
|
||||||
|
|
|
@ -434,13 +434,23 @@ en:
|
||||||
other: There are %{count} articles to add.
|
other: There are %{count} articles to add.
|
||||||
title: Add new ...
|
title: Add new ...
|
||||||
upload:
|
upload:
|
||||||
body: <p>The file has to be a text file with the ending <tt>.csv</tt>. The first line will be ignored when imported, fields are separated by semicolons (';'), and text may be enclosed by double quotation marks ("text..."). Default character-set is utf-8.</p> <p>Column order:</p>
|
|
||||||
fields:
|
fields:
|
||||||
reserved: "(Reserved)"
|
reserved: "(Reserved)"
|
||||||
status: Status (x=skip)
|
status: Status (x=skip)
|
||||||
file_label: Please choose a compatible file
|
file_label: Please choose a compatible file
|
||||||
|
sample:
|
||||||
|
juices: Juices
|
||||||
|
nuts: Nuts
|
||||||
|
organic: Organic
|
||||||
|
supplier_1: Nuttyfarm
|
||||||
|
supplier_2: Brownfields
|
||||||
|
supplier_3: Greenfields
|
||||||
|
tomato_juice: Tomato juice
|
||||||
|
walnuts: Walnuts
|
||||||
submit: Upload file
|
submit: Upload file
|
||||||
title: "%{supplier} / upload articles"
|
text_1: 'Here you can upload a spreadsheet to update the articles of %{supplier}. Excel (xls, xlsx) and OpenOffice (ods) spreadsheets are accepted, as well as comma-separated files (csv, columns separated by ";" with utf-8 encoding). Only the first sheet will be imported, and columns must be in the following order:'
|
||||||
|
text_2: 'The rows shown here are examples. When there is an "x" in the first column, the article is outlisted and will be removed. This allows you to edit the spreadsheet and quickly remove many articles at once, for example when articles become unavailable with the supplier. The category will be matched to your Foodsoft category list (both by category name and import names).'
|
||||||
|
title: "Upload articles of %{supplier}"
|
||||||
config:
|
config:
|
||||||
hints:
|
hints:
|
||||||
applepear_url: Website where the apple and pear system for tasks is explained.
|
applepear_url: Website where the apple and pear system for tasks is explained.
|
||||||
|
|
Loading…
Reference in a new issue