finish stock_takings i18n + controller
This commit is contained in:
parent
1cb933240b
commit
02f04be6e8
9 changed files with 63 additions and 42 deletions
|
@ -11,11 +11,11 @@ class StockTakingsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
create!(:notice => I18n.t('stockit.stock_taking_create.notice'))
|
create!(:notice => I18n.t('stock_takings.create.notice'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def update
|
def update
|
||||||
update!(:notice => I18n.t('stockit.stock_taking_update.notice'))
|
update!(:notice => I18n.t('stock_takings.update.notice'))
|
||||||
end
|
end
|
||||||
|
|
||||||
def fill_new_stock_article_form
|
def fill_new_stock_article_form
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Datum
|
%th= t '.date'
|
||||||
%th Notiz
|
%th= t '.note'
|
||||||
%th
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- for stock_taking in @stock_takings
|
- for stock_taking in @stock_takings
|
||||||
|
@ -14,6 +14,6 @@
|
||||||
%td= link_to format_date(stock_taking.date), stock_taking
|
%td= link_to format_date(stock_taking.date), stock_taking
|
||||||
%td= truncate stock_taking.note
|
%td= truncate stock_taking.note
|
||||||
%td
|
%td
|
||||||
= link_to 'Bearbeiten', edit_stock_taking_path(stock_taking), class: 'btn btn-mini'
|
= link_to t('ui.edit'), edit_stock_taking_path(stock_taking), class: 'btn btn-mini'
|
||||||
= link_to 'Löschen', stock_taking, :confirm => 'Are you sure?', :method => :delete,
|
= link_to t('ui.delete'), stock_taking, :confirm => t('.confirm_delete'), :method => :delete,
|
||||||
class: 'btn btn-mini btn-danger'
|
class: 'btn btn-mini btn-danger'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
- title "Inventur bearbeiten"
|
- title t('.title')
|
||||||
|
|
||||||
- simple_form_for(@stock_taking) do |f|
|
- simple_form_for(@stock_taking) do |f|
|
||||||
= f.input :date
|
= f.input :date
|
||||||
= f.input :note
|
= f.input :note
|
||||||
= f.submit
|
= f.submit
|
||||||
= link_to "oder abbrechen", stock_takings_path
|
= link_to t('.cancel'), stock_takings_path
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
- title "Inventurübersicht"
|
- title t('.title')
|
||||||
|
|
||||||
.well.well-small
|
.well.well-small
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to "Neue Inventur anlegen", new_stock_taking_path, class: 'btn'
|
= link_to t('.new_inventory'), new_stock_taking_path, class: 'btn'
|
||||||
|
|
||||||
#StockTakingsTable= render 'stock_takings'
|
#StockTakingsTable= render 'stock_takings'
|
||||||
|
|
||||||
|
|
|
@ -1,24 +1,17 @@
|
||||||
- title "Neue Inventur anlegen"
|
- title t('.title')
|
||||||
|
|
||||||
- content_for :sidebar do
|
- content_for :sidebar do
|
||||||
%p
|
%p
|
||||||
%i
|
%i= t('.text_deviations', inv_link: link_to(t('.temp_inventory'), stock_articles_path)).html_safe
|
||||||
Bitte trage hier alle gezählten Abweichungen vom
|
%p= t('.text_need_articles', create_link: link_to(t('.create'), new_stock_article_path)).html_safe
|
||||||
= link_to "vorläufigen Lagerbestand", stock_articles_path
|
|
||||||
ein. Bei Schwund benutze einfach ein Minus vor der Zahl.
|
|
||||||
%p
|
|
||||||
Einen neuen Lagerartikel musst Du vorher
|
|
||||||
= link_to "anlegen", new_stock_article_path
|
|
||||||
bevor Du Ihn hier verwenden kannst.
|
|
||||||
|
|
||||||
|
|
||||||
= simple_form_for(@stock_taking) do |f|
|
= simple_form_for(@stock_taking) do |f|
|
||||||
= f.input :date, as: :date_picker
|
= f.input :date, as: :date_picker
|
||||||
= f.input :note, :input_html => {:size => "28x7", :value => "#{@current_user.nick}: ..."}
|
= f.input :note, :input_html => {:size => "28x7", :value => "#{@current_user.nick}: ..."}
|
||||||
%h2 Lagerartikel
|
%h2= t '.stock_articles'
|
||||||
|
|
||||||
#stock_changes
|
#stock_changes
|
||||||
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
|
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
|
||||||
.form-actions
|
.form-actions
|
||||||
= f.submit class: 'btn'
|
= f.submit class: 'btn'
|
||||||
= link_to "oder abbrechen", stock_takings_path
|
= link_to t('.cancel'), stock_takings_path
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
- title "Inventur anzeigen"
|
- title t('.title')
|
||||||
|
|
||||||
.well.well-small
|
.well.well-small
|
||||||
%dl.dl-horizontal
|
%dl.dl-horizontal
|
||||||
%dt Datum
|
%dt= t '.date'
|
||||||
%dd= format_date @stock_taking.date
|
%dd= format_date @stock_taking.date
|
||||||
%dt Notiz
|
%dt= t '.note'
|
||||||
%dd= simple_format @stock_taking.note
|
%dd= simple_format @stock_taking.note
|
||||||
|
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
%tr
|
%tr
|
||||||
%th Artikel
|
%th= t '.article'
|
||||||
%th Lieferantin
|
%th= t '.supplier'
|
||||||
%th Einheit
|
%th= t '.unit'
|
||||||
%th Menge
|
%th= t '.amount'
|
||||||
- for stock_change in @stock_taking.stock_changes.all
|
- for stock_change in @stock_taking.stock_changes.all
|
||||||
%tr
|
%tr
|
||||||
%td= stock_change.stock_article.name
|
%td= stock_change.stock_article.name
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
%td= stock_change.quantity
|
%td= stock_change.quantity
|
||||||
|
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to "Bearbeiten", edit_stock_taking_path(@stock_taking), class: 'btn'
|
= link_to t('ui.edit'), edit_stock_taking_path(@stock_taking), class: 'btn'
|
||||||
= link_to "Inventurübersicht", stock_takings_path, class: 'btn'
|
= link_to t('.overview'), stock_takings_path, class: 'btn'
|
||||||
= link_to "Löschen", @stock_taking, :method => :delete, :confirm => "Willst Du wirklich die Inventur löschen?",
|
= link_to t('ui.delete'), @stock_taking, :method => :delete, :confirm => t('.confirm_delete'),
|
||||||
class: 'btn btn-danger'
|
class: 'btn btn-danger'
|
||||||
|
|
36
config/locales/de/de.stock_takings.yml
Normal file
36
config/locales/de/de.stock_takings.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
de:
|
||||||
|
stock_takings:
|
||||||
|
edit:
|
||||||
|
title: 'Inventur bearbeiten'
|
||||||
|
cancel: 'or cancel'
|
||||||
|
index:
|
||||||
|
title: 'Inventurübersicht'
|
||||||
|
new_inventory: 'Neue Inventur anlegen'
|
||||||
|
new:
|
||||||
|
title: 'Neue Inventur anlegen'
|
||||||
|
text_deviations: 'Bitte trage hier alle gezählten Abweichungen vom %{inv_link} ein. Bei Schwund benutze einfach ein Minus vor der Zahl.'
|
||||||
|
temp_inventory: 'vorläufigen Lagerbestand'
|
||||||
|
text_need_articles: 'Einen neuen Lagerartikel musst Du vorher %{create_link} bevor Du Ihn hier verwenden kannst.'
|
||||||
|
create: 'anlegen'
|
||||||
|
stock_articles: 'Lagerartikel'
|
||||||
|
cancel: 'oder abbrechen'
|
||||||
|
show:
|
||||||
|
title: 'Inventur anzeigen'
|
||||||
|
date: 'Datum'
|
||||||
|
note: 'Notiz'
|
||||||
|
article: 'Artikel'
|
||||||
|
supplier: 'Lieferantin'
|
||||||
|
unit: 'Einheit'
|
||||||
|
amount: 'Menge'
|
||||||
|
overview: 'Inventurübersicht'
|
||||||
|
confirm_delete: 'Willst Du wirklicht die Inventur löschen?'
|
||||||
|
stock_takings:
|
||||||
|
date: 'Datum'
|
||||||
|
note: 'Notiz'
|
||||||
|
confirm_delete: 'Bist Du sicher?'
|
||||||
|
|
||||||
|
# used by controller
|
||||||
|
create:
|
||||||
|
notice: 'Inventur wurde erfolgreich angelegt.'
|
||||||
|
update:
|
||||||
|
notice: 'Inventur wurde aktualisiert.'
|
|
@ -35,10 +35,6 @@ de:
|
||||||
notice: 'Lagerartikel wurde gespeichert.'
|
notice: 'Lagerartikel wurde gespeichert.'
|
||||||
stock_update:
|
stock_update:
|
||||||
notice: 'Lagerartikel wurde gespeichert.'
|
notice: 'Lagerartikel wurde gespeichert.'
|
||||||
stock_taking_create:
|
|
||||||
notice: 'Inventur wurde erfolgreich angelegt.'
|
|
||||||
stock_taking_update:
|
|
||||||
notice: 'Inventur wurde aktualisiert.'
|
|
||||||
|
|
||||||
# used by model
|
# used by model
|
||||||
check:
|
check:
|
||||||
|
|
|
@ -35,10 +35,6 @@ en:
|
||||||
notice: 'Stock article was created.'
|
notice: 'Stock article was created.'
|
||||||
stock_update:
|
stock_update:
|
||||||
notice: 'Stock article was saved.'
|
notice: 'Stock article was saved.'
|
||||||
stock_taking_create:
|
|
||||||
notice: 'Inventory was created successfully.'
|
|
||||||
stock_taking_update:
|
|
||||||
notice: 'Inventory was updated.'
|
|
||||||
|
|
||||||
# used by model
|
# used by model
|
||||||
check:
|
check:
|
||||||
|
|
Loading…
Add table
Reference in a new issue