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,6 +36,7 @@ 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.'

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

View file

@ -68,6 +68,4 @@
%form{ :action => url_for(update_selected_supplier_articles_path(@supplier)), :method => "post", :id => "articlesInListForm" }
#table= render :partial => 'articles'
%br/
= link_to "Zurück", :action => 'index'
#edit_article{:style => "display:none"}

View file

@ -1,15 +1,15 @@
%h1 Finanzbereich
.left_column{:style => 'width: 50%'}
.box_title
%h2 Unpaid invoices
%h2 Unbezahlte Rechnungen
.column_content
%p= link_to "Show all invoices", finance_invoices_path
%p= link_to "Zeige alle Rechnungen", finance_invoices_path
%table.list
%thead
%tr
%th Date
%th Amount
%th Supplier
%th Datum
%th Betrag
%th Lieferant
%th
%tbody
- for invoice in @unpaid_invoices
@ -17,7 +17,7 @@
%td= format_date(invoice.date)
%td= number_to_currency(invoice.amount)
%td=h invoice.supplier.name
%td= link_to "Edit", edit_finance_invoice_path(invoice)
%td= link_to "Bearbeiten", edit_finance_invoice_path(invoice)
.box_title
%h2 letzte Überweisungen

View file

@ -1,6 +1,6 @@
%tr.transaction
%td
%select{:name => 'financial_transactions[][ordergroup_id]'}
= options_for_select Ordergroup.find(:all, :order => 'name').collect { |g| [ g.name, g.id ] }
= options_for_select Ordergroup.without_deleted.all(:order => 'name').collect { |g| [ g.name, g.id ] }
%td= text_field_tag 'financial_transactions[][amount]'
%td= link_to_function image_tag("b_drop.png", :size => "16x16", :alt => _("Remove"), :border => "0"), "$(this).up('.transaction').remove()", {:title => _("Remove ordergroup")}
%td= link_to_function icon(:delete), "$(this).up('.transaction').remove()", {:title => "Gruppe enfernen"}

View file

@ -1,5 +1,5 @@
%p
= _("Found") + ":"
Gefunden:
= @total
%p
%table{:style => "width:100%"}
@ -12,9 +12,9 @@
%table.list
%thead
%tr
%th= sort_link_helper _("Name"), "name", @per_page
%th= sort_link_helper "Name", "name", @per_page
%th Kontakt
%th= sort_link_helper _("Account balance"), "account_balance", @per_page
%th= sort_link_helper "Kontostand", "account_balance", @per_page
%th
%tbody
- for group in @groups
@ -23,6 +23,6 @@
%td= group.contact
%td{:class => "currency", :style => "width:5em"}= number_to_currency(group.account_balance)
%td{:class => "actions"}
= link_to image_tag("euro_new.png", :size => "16x16", :alt => _("New transaction"), :border => "0"), {:action => 'new', :id => group}, {:title => _("New transaction")}
= link_to image_tag("b_browse.png", :size => "16x16", :border => "0", :alt => 'Kontoauszug'), {:action => 'list', :id => group}, {:title => _("List transactions")}
= link_to image_tag("euro_new.png", :size => "16x16", :alt => "Neue Transaktion", :border => "0"), {:action => 'new', :id => group}, {:title => "Neue Transaktion"}
= link_to image_tag("b_browse.png", :size => "16x16", :border => "0", :alt => 'Kontoauszug'), {:action => 'list', :id => group}, {:title => "Kontoauszug"}

View file

@ -1,16 +1,16 @@
%h1 Manage accounts
- title "Konten verwalten"
%p
%i
=_ "To create multiple transactions at once please follow this "
= link_to _("link"), :action => 'new_collection'
Um mehrer Transaktionen auf einmal anzulegen folge bitte diesem
= link_to _("Link"), :action => 'new_collection'
.left_column{:style=>"width:50em"}
.box_title
%h2=_ "Ordergroups"
%h2 Bestellgruppen
.column_content
#group_filter
%form{:name=>"sform", :action=>"", :style=>"display:inline;"}
%label{:for => 'article_name'}= _("Search in name") + ":"
Suchen im Namen:
= text_field_tag("query", params['query'], :size => 10 )
= observe_field 'query', :frequency => 2, |

View file

@ -1,21 +1,21 @@
%h1 New transaction
- title "Neue Transaktion"
.edit_form{ :style => "width:30em" }
- form_for(@financial_transaction, :url => { :action => 'create' }) do |f|
- form_for @financial_transaction, :url => {:action => 'create'} do |f|
= f.error_messages
= f.hidden_field :ordergroup_id
%p
Group:
Bestellgruppe:
%b=h @group.name
%p
= f.label :amount
Betrag
%br/
= f.text_field :amount, :size => 10
%p
= f.label :note
Notiz
%br/
= f.text_area :note, :cols => 40, :rows => 5
%p
= submit_tag "Save"
= link_to "Back", :controller => 'transactions'
= submit_tag "Speichern"
|
= link_to "Abbrechen", :controller => 'transactions'

View file

@ -1,20 +1,20 @@
- title _("Update multiple accounts")
- title "Mehrer Konten aktualisieren"
- form_tag :action => "create_collection" do
%p
%b= _("Note") + ":"
%b Notiz
= text_field_tag "note"
%p
%table#Ordergroups{:style => "width:20em"}
%tr
%th=_ "Ordergroup"
%th=_ "Amount"
%th Bestellgruppe
%th Betrag
= render :partial => 'ordergroup', :collection => [1, 2, 3]
%p
= link_to_function _("Add another ordergroup") do |page|
= link_to_function "Neue Bestellgruppe hinzufügen" do |page|
- page.insert_html :bottom, :Ordergroups, :partial => 'ordergroup'
%p
= submit_tag _("Save")
= submit_tag "Transaktionen speichern"
|
= link_to _("Cancel"), :controller => 'finance/transactions'
= link_to "Abbrechen", :controller => 'finance/transactions'

View file

@ -1,5 +1,5 @@
- for group in Group.find :all, :conditions => "type != 'Ordergroup'"
%h4= link_to_function group.name, "Element.toggle('group_#{group.id}')"
%h4= link_to_function group.name, "Element.toggle('workgroup_#{group.id}')"
%ul{:style => "display:none"}[group]
- for user in group.users.find :all, :order => "nick"
%li= user.nick + " (#{user.ordergroup.name if user.ordergroup})"

View file

@ -3,7 +3,7 @@
.left_column{:style => "width:40em;"}
- form_for(@stock_taking) do |f|
.box_title
%h2 Lieferung anlegen
%h2 Inventur anlegen
.column_content
= f.error_messages
%p
@ -23,7 +23,7 @@
#stock_changes
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
%p
= f.submit "Invenur anlegen"
= f.submit "Inventur anlegen"
|
= link_to "Abbrechen", stock_takings_path

View file

@ -17,7 +17,9 @@
|
= link_to_if @current_user.role_orders?, "Lagerbestellung online stellen", {:controller => 'orders', :action => 'new', :supplier_id => 0}
|
= link_to "Inventur anlegen", new_stock_taking_path
%b= link_to "Inventur anlegen", new_stock_taking_path
|
= link_to "Inventurübersicht", stock_takings_path
#articles{:style => "clear:both;margin-top:1em"}
%table.list

View file

@ -1,6 +1,6 @@
- title "Artikeldatenbank"
.left_column{:style => "width:50%"}
.left_column{:style => "width:60%"}
.box_title
%h2 Lieferanten
.column_content
@ -19,20 +19,22 @@
%th KundenNr
%th
%th
%th
%tbody
- for supplier in @suppliers
%tr{:class => cycle('even','odd', :name => 'suppliers')}
%td= link_to h(supplier.name) , supplier
%td=h supplier.phone
%td=h supplier.customer_number
%td= link_to "Artikel (#{supplier.articles.count})", supplier_articles_path(supplier)
%td= link_to "Artikel (#{supplier.articles.without_deleted.count})", supplier_articles_path(supplier)
%td= link_to "im Lager (#{supplier.stock_articles.without_deleted.count})", stock_articles_path
%td= link_to "Lieferungen", supplier_deliveries_path(supplier)
.right_column{:style => "width:47%"}
.right_column{:style => "width:37%"}
.box_title
%h2 Letzte Lieferungen
.column_content
%table{:style => "width:50em"}
%table
%tr
%th Datum
%th Betrag

View file

@ -1,30 +1,30 @@
= form.error_messages
%p
%b= form.label :name
%b Name
%br/
= form.text_field :name
%p
%b= form.label :description
%b Beschreibung
%br/
= form.text_area :description, :cols => 50, :rows => 10
%p
%b= form.label :user
%small=_ 'tasks can have multiple assignments'
%b Verantwortliche
%small Aufgaben können mehrere Verantwortliche haben
/%br/
/= render :partial => "assignments"
%p
%small=_ 'use commas to seperate the names'
%small Benutze Kommas um mehrere Benutzerinnen zu trennen
%br/
= text_field_with_auto_complete :task, :user_list, {}, {:tokens => ","}
%p
%b= form.label :required_users, "How many users are altogether required?"
%b Wieviel Benutzerinnen werden insgesamt benötigt?
%br/
= form.text_field :required_users, :size => 3
%p
%b= form.label :workgroup
%b Arbeitsgruppe
%br/
= form.select :workgroup_id, Workgroup.all(:order => 'name').collect {|g| [ g.name, g.id ] }, { :include_blank => true }
%p
%b= form.label :due_date
%b Fälligkeit
%br/
= form.date_select :due_date, :start_year => 2007, :include_blank => true

View file

@ -6,6 +6,7 @@
= submit_tag "Aufgabe erstellen"
#workgroup_members{:style => "padding-left:41em"}
%h3 Mitglieder der Gruppe
%h3 Mitglieder der Arbeitsgruppen
%i Klicke auf den Gruppennamen um die Mitglieder zu sehen
#list
= render :partial => "shared/workgroup_members"

View file

@ -1,5 +1,6 @@
ActionController::Routing::Routes.draw do |map|
map.logout '/logout', :controller => 'login', :action => 'logout'
map.my_profile '/home/profile', :controller => 'home', :action => 'profile'
map.my_ordergroup '/home/ordergroup', :controller => 'home', :action => 'ordergroup'
map.my_tasks '/home/tasks', :controller => 'tasks', :action => 'myTasks'