finish articles i18n
This commit is contained in:
parent
7af796c09c
commit
aabeb1a332
7 changed files with 147 additions and 85 deletions
|
@ -2,18 +2,19 @@
|
|||
%thead
|
||||
%tr
|
||||
%th
|
||||
%acronym{:title => "verfügbar"} verf.
|
||||
%th Name
|
||||
%th Einheit
|
||||
%acronym{:title => t('.available_desc')}= t '.available_short'
|
||||
%th= t 'simple_form.labels.article.name'
|
||||
%th= t 'simple_form.labels.article.unit'
|
||||
%th
|
||||
%acronym{:title => "Netto!"} Preis
|
||||
%acronym{:title => t('.price_desc')}= t '.price_short'
|
||||
%th
|
||||
%acronym{:title => "Gebindegröße"} GebGr
|
||||
%th Best.Nr.
|
||||
%th Notiz
|
||||
%th Kategorie
|
||||
%th MwSt.
|
||||
%th Pfand
|
||||
%acronym{:title => t('.unit_quantity_desc')}= t '.unit_quantity_short'
|
||||
%th
|
||||
%acronym{:title => t('.order_number_desc')}= t '.order_number_short'
|
||||
%th= t 'simple_form.labels.article.note'
|
||||
%th= t 'simple_form.labels.article.article_category'
|
||||
%th= t 'simple_form.labels.defaults.tax'
|
||||
%th= t 'simple_form.labels.defaults.deposit'
|
||||
%tbody
|
||||
- @articles.each_with_index do |article, index|
|
||||
= fields_for "articles[#{article.id || index}]", article do |form|
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
- if @articles.empty?
|
||||
%p Keine Artikel gefunden
|
||||
%p= t '.not_found'
|
||||
- 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= t 'simple_form.labels.article.name'
|
||||
%th= t 'simple_form.labels.article.origin'
|
||||
%th= t 'simple_form.labels.article.manufacturer'
|
||||
%th= t 'simple_form.labels.article.note'
|
||||
%th{:style => "width:4em"}= t 'simple_form.labels.defaults.price'
|
||||
%th= t 'simple_form.labels.article.unit'
|
||||
%th= t 'simple_form.labels.defaults.unit_quantity'
|
||||
%th
|
||||
%tbody
|
||||
- for article in @articles
|
||||
|
@ -26,8 +26,7 @@
|
|||
%td
|
||||
- logger.debug "[debug] #{article.attributes.inspect}"
|
||||
- if @supplier.articles.undeleted.where(order_number: article.number).exists?
|
||||
%i.icon-ok
|
||||
schon importiert
|
||||
%i.icon-ok= t '.already_imported'
|
||||
- else
|
||||
= link_to 'importieren', import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||
= link_to t('.action_import'), import_supplier_articles_path(@supplier, :shared_article_id => article.id),
|
||||
:remote => true, class: 'btn btn-small btn-success'
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
- title "Artikel von #{@supplier.name} (#{@supplier.articles.undeleted.count})"
|
||||
- title t('.title', supplier: @supplier.name, count: @supplier.articles.undeleted.count)
|
||||
|
||||
.well.well-small
|
||||
.btn-toolbar
|
||||
= form_tag supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search pull-right',
|
||||
'data-submit-onchange' => true do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: 'Name ...'
|
||||
placeholder: t('.search_placeholder')
|
||||
|
||||
.btn-group
|
||||
= link_to "Neuer Artikel", new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
||||
= link_to "Alle bearbeiten", edit_all_supplier_articles_path(@supplier), class: 'btn'
|
||||
= link_to "Artikel hochladen", upload_supplier_articles_path(@supplier), class: 'btn'
|
||||
= link_to t('.new'), new_supplier_article_path(@supplier), remote: true, class: 'btn btn-primary'
|
||||
= link_to t('.edit_all'), edit_all_supplier_articles_path(@supplier), class: 'btn'
|
||||
= link_to t('.upload'), upload_supplier_articles_path(@supplier), class: 'btn'
|
||||
- if current_user.role_orders?
|
||||
= link_to "Bestellung anlegen", new_order_path(supplier_id: @supplier), class: 'btn'
|
||||
= link_to t('.new_order'), new_order_path(supplier_id: @supplier), class: 'btn'
|
||||
|
||||
- unless @supplier.shared_supplier.nil?
|
||||
.btn-group
|
||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn btn-success dropdown-toggle' do
|
||||
Externe Datenbank
|
||||
= t '.ext_db.title'
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
%li= link_to "Suchen/Importieren", "#import", 'data-toggle-this' => '#import'
|
||||
%li= link_to "Synchronisieren", sync_supplier_articles_path(@supplier), method: :post
|
||||
%li= link_to t('.ext_db.import'), "#import", 'data-toggle-this' => '#import'
|
||||
%li= link_to t('.ext_db.sync'), sync_supplier_articles_path(@supplier), method: :post
|
||||
|
||||
.btn-group
|
||||
= link_to '#', data: {toggle: 'dropdown'}, class: 'btn dropdown-toggle' do
|
||||
Lieferant wechseln ..
|
||||
= t '.change_supplier'
|
||||
%span.caret
|
||||
%ul.dropdown-menu
|
||||
- Supplier.undeleted.where('id != ?', @supplier.id).order('suppliers.name ASC').each do |supplier|
|
||||
|
@ -35,13 +35,14 @@
|
|||
#import.well.well-small(style="display:none;")
|
||||
= form_tag shared_supplier_articles_path(@supplier), method: :get, remote: true, class: 'form-search',
|
||||
'data-submit-onchange' => true do
|
||||
%h3 Artikel importieren
|
||||
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query', placeholder: 'Name ...'
|
||||
%h3= t '.import.title'
|
||||
= text_field_tag "search[name_contains_all]", "", class: 'input-medium search-query',
|
||||
placeholder: t('.import.placeholder')
|
||||
%label.checkbox
|
||||
= check_box_tag "search[origin_equals]", "REG", false
|
||||
Nur aus der Region
|
||||
= t '.import.restrict_region'
|
||||
#search_results.clearfix
|
||||
= link_to "Schließen", "#import", 'data-toggle-this' => '#import'
|
||||
= link_to t('ui.close'), "#import", 'data-toggle-this' => '#import'
|
||||
|
||||
= form_tag update_selected_supplier_articles_path(@supplier), id: "articlesInListForm",
|
||||
'data-submit-onchange' => true do
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
- title "#{@supplier.name} / Artikel hochladen"
|
||||
%p
|
||||
%i
|
||||
Bitte überprüfe die eingelesenen Artikel.
|
||||
%br/
|
||||
Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.
|
||||
- title t('.title', supplier: @supplier.name)
|
||||
%p= t('.body').html_safe
|
||||
|
||||
= form_tag(create_from_upload_supplier_articles_path(@supplier)) do
|
||||
= render 'edit_all_table'
|
||||
.form-actions
|
||||
= submit_tag "Speichere neue Artikel für #{@supplier.name}", class: 'btn btn-primary'
|
||||
= link_to "order abbrechen", upload_supplier_articles_path(@supplier)
|
||||
= submit_tag t('.submit', supplier: @supplier.name), class: 'btn btn-primary'
|
||||
= link_to t('.or_cancel'), upload_supplier_articles_path(@supplier)
|
||||
|
|
@ -1,43 +1,37 @@
|
|||
- title 'Artikel mit externer Datenbank synchronisieren'
|
||||
|
||||
= form_tag update_all_supplier_articles_path(@supplier, :sync => "1") do
|
||||
%h2 Auslisten ...
|
||||
%h2= t '.outlist.title'
|
||||
%p
|
||||
- unless @outlisted_articles.empty?
|
||||
Folgende Artikel wurden ausgelistet und werden
|
||||
%b gelöscht:
|
||||
= t('.outlist.body').html_safe
|
||||
%ul
|
||||
- for article in @outlisted_articles
|
||||
%li
|
||||
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
|
||||
= article.name
|
||||
- else
|
||||
%i Es müssen keine Artikel gelöscht werden.
|
||||
%i= t '.outlist.body_skip'
|
||||
%hr/
|
||||
%h2 Aktualisieren ...
|
||||
%h2= t '.update.title'
|
||||
%p
|
||||
%i
|
||||
%b= @updated_articles.size
|
||||
Artikel müssen aktualisiert werden:
|
||||
%p
|
||||
%i
|
||||
Jeder Artikel wird doppelt angezeigt. Die alten Werte sind grau und die Textfelder sind mit den aktuellen
|
||||
Werten vorausgefüllt.
|
||||
%br/
|
||||
Abweichungen zu den alten Artikeln sind gelb markiert.
|
||||
= t '.update.update_msg'
|
||||
= t('.update.body').html_safe
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th Name
|
||||
%th Notiz
|
||||
%th Hersteller
|
||||
%th Herkunft
|
||||
%th Einheit
|
||||
%th GebGr
|
||||
%th Preis
|
||||
%th MwSt.
|
||||
%th Pfand
|
||||
%th Kategorie
|
||||
%th= t 'simple_form.labels.article.name'
|
||||
%th= t 'simple_form.labels.article.note'
|
||||
%th= t 'simple_form.labels.article.manufacturer'
|
||||
%th= t 'simple_form.labels.article.origin'
|
||||
%th= t 'simple_form.labels.article.unit'
|
||||
%th= t '.unit_quantity_short'
|
||||
%th= t '.price_short'
|
||||
%th= t 'simple_form.labels.defaults.tax'
|
||||
%th= t 'simple_form.labels.defaults.deposit'
|
||||
%th= t 'simple_form.labels.article.article_category'
|
||||
%tbody
|
||||
- @updated_articles.each do |updated_article, attrs|
|
||||
- article = Article.find(updated_article.id)
|
||||
|
@ -69,5 +63,5 @@
|
|||
{include_blank: true}, class: 'input-small'
|
||||
%hr/
|
||||
= hidden_field 'supplier', 'id'
|
||||
= submit_tag 'Alle löschen/aktualisieren', class: 'btn btn-primary'
|
||||
= link_to 'oder abbrechen', supplier_articles_path(@supplier)
|
||||
= submit_tag t('.submit'), class: 'btn btn-primary'
|
||||
= link_to t('.or_cancel'), supplier_articles_path(@supplier)
|
||||
|
|
|
@ -1,21 +1,24 @@
|
|||
- title "#{@supplier.name} / Artikel hochladen"
|
||||
%p
|
||||
Die Datei muss eine Textdatei mit der Endung '.csv' sein. Die erste Zeile
|
||||
wird beim Einlesen ignoriert.
|
||||
%br/
|
||||
Die Felder müssen mit einem Semikolon (';') getrennt und der Text mit doppelten
|
||||
Anführungszeichen ("Text...") umklammert werden.
|
||||
%br/
|
||||
Als Zeichensatz wird UTF-8 erwartet. Korrekte Reihenfolge der Spalten:
|
||||
%pre
|
||||
= ["Status (x=ausgelistet)", "Bestellnummer", "Name", "Notiz", "Hersteller", "Herkunft",
|
||||
"Einheit", "Preis(netto)", "MwSt", "Pfand", "Gebindegröße",
|
||||
"Staffelmenge", "Staffelpreis", "Kategorie"].join(" | ")
|
||||
- title t('.title', supplier: @supplier.name)
|
||||
= t('.body').html_safe
|
||||
%pre
|
||||
= [t('.fields.status'),
|
||||
t('simple_form.labels.defaults.order_number'),
|
||||
t('simple_form.labels.article.name'),
|
||||
t('simple_form.labels.article.note'),
|
||||
t('simple_form.labels.article.manufacturer'),
|
||||
t('simple_form.labels.article.origin'),
|
||||
t('simple_form.labels.article.unit'),
|
||||
t('simple_form.labels.defaults.price'),
|
||||
t('simple_form.labels.defaults.tax'),
|
||||
t('simple_form.labels.defaults.deposit'),
|
||||
t('simple_form.labels.defaults.unit_quantity'),
|
||||
t('.fields.season_amount'),
|
||||
t('.fields.season_price'),
|
||||
t('simple_form.labels.article.article_category')].join(" | ")
|
||||
|
||||
= form_for :articles, :url => parse_upload_supplier_articles_path(@supplier),
|
||||
:html => { :multipart => true } do |f|
|
||||
%label(for="articles_file")
|
||||
Bitte wähle eine kompatible Datei aus
|
||||
%label(for="articles_file")= t '.file_label'
|
||||
= f.file_field "file"
|
||||
.form-actions
|
||||
= submit_tag "Datei hochladen", class: 'btn'
|
||||
= submit_tag t('.submit'), class: 'btn'
|
||||
|
|
|
@ -22,5 +22,73 @@ de:
|
|||
warning: 'Achtung, alle Artikel werden aktualisiert!'
|
||||
submit: 'Alle Artikel aktualisieren'
|
||||
or_cancel: 'oder abbrechen'
|
||||
edit_all_table:
|
||||
available_short: 'verf.'
|
||||
available_desc: 'verfügbar'
|
||||
price_short: 'Preis'
|
||||
price_desc: 'Netto!'
|
||||
unit_quantity_short: 'GebGr'
|
||||
unit_quantity_desc: 'Gebindegröße'
|
||||
order_number_short: 'Best.Nr.'
|
||||
order_number_desc: 'Bestellnummer'
|
||||
form:
|
||||
title: 'Neuen Artikel einfügen'
|
||||
index:
|
||||
title: 'Artikel von %{supplier} (%{count})'
|
||||
search_placeholder: Name ...
|
||||
new: 'Neuer Artikel'
|
||||
edit_all: 'Alle bearbeiten'
|
||||
upload: 'Artikel hochladen'
|
||||
new_order: 'Bestellung anlegen'
|
||||
ext_db:
|
||||
title: 'Externe Datenbank'
|
||||
import: 'Suchen/Importieren'
|
||||
sync: 'Synchronisieren'
|
||||
change_supplier: 'Lieferant wechseln ...'
|
||||
import:
|
||||
title: 'Artikel importieren'
|
||||
placeholder: Name ...
|
||||
restrict_region: 'Nur aus der Region'
|
||||
import_search_results:
|
||||
not_found: 'Keine Artikel gefunden'
|
||||
already_imported: 'schon importiert'
|
||||
action_import: 'importieren'
|
||||
sync:
|
||||
title: 'Artikel mit externer Datenbank synchronisieren'
|
||||
outlist:
|
||||
title: 'Auslisten ...'
|
||||
body: 'Folgende Artikel wurden ausgelistet und werden <b>gelöscht</b>:'
|
||||
body_skip: 'Es müssen keine Artikel gelöscht werden.'
|
||||
update:
|
||||
title: 'Aktualisieren ...'
|
||||
update_msg: 'Artikel müssen aktualisiert werden:'
|
||||
body:
|
||||
<p><i>Jeder Artikel wird doppelt angezeigt. Die alten Werte sind grau und die
|
||||
Textfelder sind mit den aktuellen Werten vorausgefüllt.</i></p>
|
||||
<p><i>Abweichungen zu den alten Artikeln sind gelb markiert.</i></p>
|
||||
unit_quantity_short: 'GebGr'
|
||||
price_short: 'Price'
|
||||
submit: 'Alle löschen/aktualisieren'
|
||||
or_cancel: 'oder abbrechen'
|
||||
upload:
|
||||
title: '%{supplier} / Artikel hochladen'
|
||||
body:
|
||||
<p>Die Datei muss eine Textdatei mit der Endung '.csv' sein. Die erste Zeile
|
||||
wird beim Einlesen ignoriert.</p>
|
||||
<p>Die Felder müssen mit einem Semikolon (';') getrennt und der Text mit doppelten
|
||||
Anführungszeichen ("Text...") umklammert werden.</p>
|
||||
<p>Als Zeichensatz wird UTF-8 erwartet. Korrekte Reihenfolge der Spalten:</p>
|
||||
fields:
|
||||
status: 'Status (x=ausgelistet)'
|
||||
season_amount: 'Staffelmenge'
|
||||
season_price: 'Staffelpreis'
|
||||
file_label: 'Bitte wähle eine kompatible Datei aus'
|
||||
submit: 'Datei hochladen'
|
||||
parse_upload:
|
||||
title: '%{supplier} / Artikel hochladen'
|
||||
body:
|
||||
<p><i>Bitte überprufe die engelesenen Artikel.</i></p>
|
||||
<p><i>Achtung, momentan gibt es keine Überprüfung auf doppelte Artikel.</i></p>
|
||||
submit: 'Speichere neue Artikel für %{supplier}'
|
||||
or_cancel: 'oder abbrechen'
|
||||
|
||||
|
|
Loading…
Reference in a new issue