finish stock_takings i18n + controller

This commit is contained in:
wvengen 2013-02-13 01:18:50 +01:00
parent 1cb933240b
commit 02f04be6e8
9 changed files with 63 additions and 42 deletions

View file

@ -5,8 +5,8 @@
%table.table.table-striped
%thead
%tr
%th Datum
%th Notiz
%th= t '.date'
%th= t '.note'
%th
%tbody
- for stock_taking in @stock_takings
@ -14,6 +14,6 @@
%td= link_to format_date(stock_taking.date), stock_taking
%td= truncate stock_taking.note
%td
= link_to 'Bearbeiten', edit_stock_taking_path(stock_taking), class: 'btn btn-mini'
= link_to 'Löschen', stock_taking, :confirm => 'Are you sure?', :method => :delete,
class: 'btn btn-mini btn-danger'
= link_to t('ui.edit'), edit_stock_taking_path(stock_taking), class: 'btn btn-mini'
= link_to t('ui.delete'), stock_taking, :confirm => t('.confirm_delete'), :method => :delete,
class: 'btn btn-mini btn-danger'

View file

@ -1,7 +1,7 @@
- title "Inventur bearbeiten"
- title t('.title')
- simple_form_for(@stock_taking) do |f|
= f.input :date
= f.input :note
= f.submit
= link_to "oder abbrechen", stock_takings_path
= link_to t('.cancel'), stock_takings_path

View file

@ -1,8 +1,8 @@
- title "Inventurübersicht"
- title t('.title')
.well.well-small
.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'

View file

@ -1,24 +1,17 @@
- title "Neue Inventur anlegen"
- title t('.title')
- content_for :sidebar do
%p
%i
Bitte trage hier alle gezählten Abweichungen vom
= 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.
%i= t('.text_deviations', inv_link: link_to(t('.temp_inventory'), stock_articles_path)).html_safe
%p= t('.text_need_articles', create_link: link_to(t('.create'), new_stock_article_path)).html_safe
= simple_form_for(@stock_taking) do |f|
= f.input :date, as: :date_picker
= f.input :note, :input_html => {:size => "28x7", :value => "#{@current_user.nick}: ..."}
%h2 Lagerartikel
%h2= t '.stock_articles'
#stock_changes
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
.form-actions
= f.submit class: 'btn'
= link_to "oder abbrechen", stock_takings_path
= link_to t('.cancel'), stock_takings_path

View file

@ -1,18 +1,18 @@
- title "Inventur anzeigen"
- title t('.title')
.well.well-small
%dl.dl-horizontal
%dt Datum
%dt= t '.date'
%dd= format_date @stock_taking.date
%dt Notiz
%dt= t '.note'
%dd= simple_format @stock_taking.note
%table.table.table-striped
%tr
%th Artikel
%th Lieferantin
%th Einheit
%th Menge
%th= t '.article'
%th= t '.supplier'
%th= t '.unit'
%th= t '.amount'
- for stock_change in @stock_taking.stock_changes.all
%tr
%td= stock_change.stock_article.name
@ -21,7 +21,7 @@
%td= stock_change.quantity
.btn-group
= link_to "Bearbeiten", edit_stock_taking_path(@stock_taking), class: 'btn'
= link_to "Inventurübersicht", stock_takings_path, class: 'btn'
= link_to "Löschen", @stock_taking, :method => :delete, :confirm => "Willst Du wirklich die Inventur löschen?",
class: 'btn btn-danger'
= link_to t('ui.edit'), edit_stock_taking_path(@stock_taking), class: 'btn'
= link_to t('.overview'), stock_takings_path, class: 'btn'
= link_to t('ui.delete'), @stock_taking, :method => :delete, :confirm => t('.confirm_delete'),
class: 'btn btn-danger'