Translations and other little improvements.

This commit is contained in:
Benjamin Meichsner 2009-02-12 21:38:41 +01:00
parent 951d19db6a
commit a0e10141dc
17 changed files with 63 additions and 58 deletions

View file

@ -36,7 +36,8 @@ class Admin::OrdergroupsController < ApplicationController
def create
@ordergroup = Ordergroup.new(params[:ordergroup])
@ordergroup.account_updated = Time.now
if @ordergroup.save
flash[:notice] = 'Ordergroup was successfully created.'
redirect_to([:admin, @ordergroup])

View file

@ -5,7 +5,7 @@ class AdminController < ApplicationController
def index
@user = self.current_user
@groups = Group.find(:all, :limit => 10, :order => 'created_on DESC')
@groups = Group.find(:all, :limit => 10, :order => 'created_on DESC', :conditions => {:deleted_at => nil})
@users = User.find(:all, :limit => 10, :order => 'created_on DESC')
end

View file

@ -86,17 +86,17 @@ class Finance::TransactionsController < ApplicationController
def create_collection
note = params[:note]
raise "Note is required!" if note.blank?
raise "Notiz wird benötigt!" if note.blank?
params[:financial_transactions].each do |trans|
# ignore empty amount fields ...
unless trans[:amount].blank?
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction trans[:amount], note, @current_user
end
end
flash[:notice] = 'Saved all transactions successfully'
flash[:notice] = "Alle Transaktionen wurden gespeichert."
redirect_to :action => 'index'
rescue => error
flash[:error] = "An error occured: " + error.to_s
flash[:error] = "Ein Fehler ist aufgetreten: " + error.to_s
redirect_to :action => 'new_collection'
end