finish finance controller i18n
This commit is contained in:
parent
922a6f3a2a
commit
569cdce2db
2 changed files with 8 additions and 3 deletions
|
@ -22,7 +22,7 @@ class Finance::InvoicesController < ApplicationController
|
||||||
@invoice = Invoice.new(params[:invoice])
|
@invoice = Invoice.new(params[:invoice])
|
||||||
|
|
||||||
if @invoice.save
|
if @invoice.save
|
||||||
flash[:notice] = "Rechnung wurde erstellt."
|
flash[:notice] = I18n.t('finance.create.notice')
|
||||||
if @invoice.order
|
if @invoice.order
|
||||||
# Redirect to balancing page
|
# Redirect to balancing page
|
||||||
redirect_to new_finance_order_url(order_id: @invoice.order.id)
|
redirect_to new_finance_order_url(order_id: @invoice.order.id)
|
||||||
|
@ -38,7 +38,7 @@ class Finance::InvoicesController < ApplicationController
|
||||||
@invoice = Invoice.find(params[:id])
|
@invoice = Invoice.find(params[:id])
|
||||||
|
|
||||||
if @invoice.update_attributes(params[:invoice])
|
if @invoice.update_attributes(params[:invoice])
|
||||||
redirect_to [:finance, @invoice], notice: "Rechnung wurde aktualisiert."
|
redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice')
|
||||||
else
|
else
|
||||||
render :edit
|
render :edit
|
||||||
end
|
end
|
||||||
|
|
|
@ -144,4 +144,9 @@ de:
|
||||||
title: "Konten verwalten"
|
title: "Konten verwalten"
|
||||||
new_transaction: "Neue Überweisungen eingeben"
|
new_transaction: "Neue Überweisungen eingeben"
|
||||||
search_placeholder: 'Suchen ...'
|
search_placeholder: 'Suchen ...'
|
||||||
|
|
||||||
|
# used by controller
|
||||||
|
create:
|
||||||
|
notice: 'Rechnung wurde erstellt.'
|
||||||
|
update:
|
||||||
|
notice: 'Rechnung wurde aktualisiert.'
|
||||||
|
|
Loading…
Add table
Reference in a new issue