Translations and other little improvements.
This commit is contained in:
parent
951d19db6a
commit
a0e10141dc
17 changed files with 63 additions and 58 deletions
|
@ -36,6 +36,7 @@ class Admin::OrdergroupsController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@ordergroup = Ordergroup.new(params[:ordergroup])
|
@ordergroup = Ordergroup.new(params[:ordergroup])
|
||||||
|
@ordergroup.account_updated = Time.now
|
||||||
|
|
||||||
if @ordergroup.save
|
if @ordergroup.save
|
||||||
flash[:notice] = 'Ordergroup was successfully created.'
|
flash[:notice] = 'Ordergroup was successfully created.'
|
||||||
|
|
|
@ -5,7 +5,7 @@ class AdminController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@user = self.current_user
|
@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')
|
@users = User.find(:all, :limit => 10, :order => 'created_on DESC')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -86,17 +86,17 @@ class Finance::TransactionsController < ApplicationController
|
||||||
|
|
||||||
def create_collection
|
def create_collection
|
||||||
note = params[:note]
|
note = params[:note]
|
||||||
raise "Note is required!" if note.blank?
|
raise "Notiz wird benötigt!" if note.blank?
|
||||||
params[:financial_transactions].each do |trans|
|
params[:financial_transactions].each do |trans|
|
||||||
# ignore empty amount fields ...
|
# ignore empty amount fields ...
|
||||||
unless trans[:amount].blank?
|
unless trans[:amount].blank?
|
||||||
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction trans[:amount], note, @current_user
|
Ordergroup.find(trans[:ordergroup_id]).add_financial_transaction trans[:amount], note, @current_user
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
flash[:notice] = 'Saved all transactions successfully'
|
flash[:notice] = "Alle Transaktionen wurden gespeichert."
|
||||||
redirect_to :action => 'index'
|
redirect_to :action => 'index'
|
||||||
rescue => error
|
rescue => error
|
||||||
flash[:error] = "An error occured: " + error.to_s
|
flash[:error] = "Ein Fehler ist aufgetreten: " + error.to_s
|
||||||
redirect_to :action => 'new_collection'
|
redirect_to :action => 'new_collection'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,4 @@
|
||||||
%form{ :action => url_for(update_selected_supplier_articles_path(@supplier)), :method => "post", :id => "articlesInListForm" }
|
%form{ :action => url_for(update_selected_supplier_articles_path(@supplier)), :method => "post", :id => "articlesInListForm" }
|
||||||
#table= render :partial => 'articles'
|
#table= render :partial => 'articles'
|
||||||
|
|
||||||
%br/
|
|
||||||
= link_to "Zurück", :action => 'index'
|
|
||||||
#edit_article{:style => "display:none"}
|
#edit_article{:style => "display:none"}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
%h1 Finanzbereich
|
%h1 Finanzbereich
|
||||||
.left_column{:style => 'width: 50%'}
|
.left_column{:style => 'width: 50%'}
|
||||||
.box_title
|
.box_title
|
||||||
%h2 Unpaid invoices
|
%h2 Unbezahlte Rechnungen
|
||||||
.column_content
|
.column_content
|
||||||
%p= link_to "Show all invoices", finance_invoices_path
|
%p= link_to "Zeige alle Rechnungen", finance_invoices_path
|
||||||
%table.list
|
%table.list
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th Date
|
%th Datum
|
||||||
%th Amount
|
%th Betrag
|
||||||
%th Supplier
|
%th Lieferant
|
||||||
%th
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- for invoice in @unpaid_invoices
|
- for invoice in @unpaid_invoices
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
%td= format_date(invoice.date)
|
%td= format_date(invoice.date)
|
||||||
%td= number_to_currency(invoice.amount)
|
%td= number_to_currency(invoice.amount)
|
||||||
%td=h invoice.supplier.name
|
%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
|
.box_title
|
||||||
%h2 letzte Überweisungen
|
%h2 letzte Überweisungen
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
%tr.transaction
|
%tr.transaction
|
||||||
%td
|
%td
|
||||||
%select{:name => 'financial_transactions[][ordergroup_id]'}
|
%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= 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"}
|
|
@ -1,5 +1,5 @@
|
||||||
%p
|
%p
|
||||||
= _("Found") + ":"
|
Gefunden:
|
||||||
= @total
|
= @total
|
||||||
%p
|
%p
|
||||||
%table{:style => "width:100%"}
|
%table{:style => "width:100%"}
|
||||||
|
@ -12,9 +12,9 @@
|
||||||
%table.list
|
%table.list
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th= sort_link_helper _("Name"), "name", @per_page
|
%th= sort_link_helper "Name", "name", @per_page
|
||||||
%th Kontakt
|
%th Kontakt
|
||||||
%th= sort_link_helper _("Account balance"), "account_balance", @per_page
|
%th= sort_link_helper "Kontostand", "account_balance", @per_page
|
||||||
%th
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- for group in @groups
|
- for group in @groups
|
||||||
|
@ -23,6 +23,6 @@
|
||||||
%td= group.contact
|
%td= group.contact
|
||||||
%td{:class => "currency", :style => "width:5em"}= number_to_currency(group.account_balance)
|
%td{:class => "currency", :style => "width:5em"}= number_to_currency(group.account_balance)
|
||||||
%td{:class => "actions"}
|
%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("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 => _("List transactions")}
|
= link_to image_tag("b_browse.png", :size => "16x16", :border => "0", :alt => 'Kontoauszug'), {:action => 'list', :id => group}, {:title => "Kontoauszug"}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
%h1 Manage accounts
|
- title "Konten verwalten"
|
||||||
%p
|
%p
|
||||||
%i
|
%i
|
||||||
=_ "To create multiple transactions at once please follow this "
|
Um mehrer Transaktionen auf einmal anzulegen folge bitte diesem
|
||||||
= link_to _("link"), :action => 'new_collection'
|
= link_to _("Link"), :action => 'new_collection'
|
||||||
|
|
||||||
.left_column{:style=>"width:50em"}
|
.left_column{:style=>"width:50em"}
|
||||||
.box_title
|
.box_title
|
||||||
%h2=_ "Ordergroups"
|
%h2 Bestellgruppen
|
||||||
.column_content
|
.column_content
|
||||||
#group_filter
|
#group_filter
|
||||||
%form{:name=>"sform", :action=>"", :style=>"display:inline;"}
|
%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 )
|
= text_field_tag("query", params['query'], :size => 10 )
|
||||||
|
|
||||||
= observe_field 'query', :frequency => 2, |
|
= observe_field 'query', :frequency => 2, |
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
%h1 New transaction
|
- title "Neue Transaktion"
|
||||||
|
|
||||||
.edit_form{ :style => "width:30em" }
|
.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.error_messages
|
||||||
= f.hidden_field :ordergroup_id
|
= f.hidden_field :ordergroup_id
|
||||||
%p
|
%p
|
||||||
Group:
|
Bestellgruppe:
|
||||||
%b=h @group.name
|
%b=h @group.name
|
||||||
%p
|
%p
|
||||||
= f.label :amount
|
Betrag
|
||||||
%br/
|
%br/
|
||||||
= f.text_field :amount, :size => 10
|
= f.text_field :amount, :size => 10
|
||||||
%p
|
%p
|
||||||
= f.label :note
|
Notiz
|
||||||
%br/
|
%br/
|
||||||
= f.text_area :note, :cols => 40, :rows => 5
|
= f.text_area :note, :cols => 40, :rows => 5
|
||||||
%p
|
%p
|
||||||
= submit_tag "Save"
|
= submit_tag "Speichern"
|
||||||
|
|
|
||||||
= link_to "Back", :controller => 'transactions'
|
= link_to "Abbrechen", :controller => 'transactions'
|
|
@ -1,20 +1,20 @@
|
||||||
- title _("Update multiple accounts")
|
- title "Mehrer Konten aktualisieren"
|
||||||
|
|
||||||
- form_tag :action => "create_collection" do
|
- form_tag :action => "create_collection" do
|
||||||
%p
|
%p
|
||||||
%b= _("Note") + ":"
|
%b Notiz
|
||||||
= text_field_tag "note"
|
= text_field_tag "note"
|
||||||
%p
|
%p
|
||||||
%table#Ordergroups{:style => "width:20em"}
|
%table#Ordergroups{:style => "width:20em"}
|
||||||
%tr
|
%tr
|
||||||
%th=_ "Ordergroup"
|
%th Bestellgruppe
|
||||||
%th=_ "Amount"
|
%th Betrag
|
||||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||||
|
|
||||||
%p
|
%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'
|
- page.insert_html :bottom, :Ordergroups, :partial => 'ordergroup'
|
||||||
%p
|
%p
|
||||||
= submit_tag _("Save")
|
= submit_tag "Transaktionen speichern"
|
||||||
|
|
|
|
||||||
= link_to _("Cancel"), :controller => 'finance/transactions'
|
= link_to "Abbrechen", :controller => 'finance/transactions'
|
|
@ -1,5 +1,5 @@
|
||||||
- for group in Group.find :all, :conditions => "type != 'Ordergroup'"
|
- 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]
|
%ul{:style => "display:none"}[group]
|
||||||
- for user in group.users.find :all, :order => "nick"
|
- for user in group.users.find :all, :order => "nick"
|
||||||
%li= user.nick + " (#{user.ordergroup.name if user.ordergroup})"
|
%li= user.nick + " (#{user.ordergroup.name if user.ordergroup})"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
.left_column{:style => "width:40em;"}
|
.left_column{:style => "width:40em;"}
|
||||||
- form_for(@stock_taking) do |f|
|
- form_for(@stock_taking) do |f|
|
||||||
.box_title
|
.box_title
|
||||||
%h2 Lieferung anlegen
|
%h2 Inventur anlegen
|
||||||
.column_content
|
.column_content
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
%p
|
%p
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
#stock_changes
|
#stock_changes
|
||||||
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
|
= render :partial => 'stock_change', :collection => @stock_taking.stock_changes
|
||||||
%p
|
%p
|
||||||
= f.submit "Invenur anlegen"
|
= f.submit "Inventur anlegen"
|
||||||
|
|
|
|
||||||
= link_to "Abbrechen", stock_takings_path
|
= link_to "Abbrechen", stock_takings_path
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
|
|
|
|
||||||
= link_to_if @current_user.role_orders?, "Lagerbestellung online stellen", {:controller => 'orders', :action => 'new', :supplier_id => 0}
|
= 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"}
|
#articles{:style => "clear:both;margin-top:1em"}
|
||||||
%table.list
|
%table.list
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
- title "Artikeldatenbank"
|
- title "Artikeldatenbank"
|
||||||
|
|
||||||
.left_column{:style => "width:50%"}
|
.left_column{:style => "width:60%"}
|
||||||
.box_title
|
.box_title
|
||||||
%h2 Lieferanten
|
%h2 Lieferanten
|
||||||
.column_content
|
.column_content
|
||||||
|
@ -19,20 +19,22 @@
|
||||||
%th KundenNr
|
%th KundenNr
|
||||||
%th
|
%th
|
||||||
%th
|
%th
|
||||||
|
%th
|
||||||
%tbody
|
%tbody
|
||||||
- for supplier in @suppliers
|
- for supplier in @suppliers
|
||||||
%tr{:class => cycle('even','odd', :name => 'suppliers')}
|
%tr{:class => cycle('even','odd', :name => 'suppliers')}
|
||||||
%td= link_to h(supplier.name) , supplier
|
%td= link_to h(supplier.name) , supplier
|
||||||
%td=h supplier.phone
|
%td=h supplier.phone
|
||||||
%td=h supplier.customer_number
|
%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)
|
%td= link_to "Lieferungen", supplier_deliveries_path(supplier)
|
||||||
|
|
||||||
.right_column{:style => "width:47%"}
|
.right_column{:style => "width:37%"}
|
||||||
.box_title
|
.box_title
|
||||||
%h2 Letzte Lieferungen
|
%h2 Letzte Lieferungen
|
||||||
.column_content
|
.column_content
|
||||||
%table{:style => "width:50em"}
|
%table
|
||||||
%tr
|
%tr
|
||||||
%th Datum
|
%th Datum
|
||||||
%th Betrag
|
%th Betrag
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
= form.error_messages
|
= form.error_messages
|
||||||
%p
|
%p
|
||||||
%b= form.label :name
|
%b Name
|
||||||
%br/
|
%br/
|
||||||
= form.text_field :name
|
= form.text_field :name
|
||||||
%p
|
%p
|
||||||
%b= form.label :description
|
%b Beschreibung
|
||||||
%br/
|
%br/
|
||||||
= form.text_area :description, :cols => 50, :rows => 10
|
= form.text_area :description, :cols => 50, :rows => 10
|
||||||
%p
|
%p
|
||||||
%b= form.label :user
|
%b Verantwortliche
|
||||||
%small=_ 'tasks can have multiple assignments'
|
%small Aufgaben können mehrere Verantwortliche haben
|
||||||
/%br/
|
/%br/
|
||||||
/= render :partial => "assignments"
|
/= render :partial => "assignments"
|
||||||
%p
|
%p
|
||||||
%small=_ 'use commas to seperate the names'
|
%small Benutze Kommas um mehrere Benutzerinnen zu trennen
|
||||||
%br/
|
%br/
|
||||||
= text_field_with_auto_complete :task, :user_list, {}, {:tokens => ","}
|
= text_field_with_auto_complete :task, :user_list, {}, {:tokens => ","}
|
||||||
%p
|
%p
|
||||||
%b= form.label :required_users, "How many users are altogether required?"
|
%b Wieviel Benutzerinnen werden insgesamt benötigt?
|
||||||
%br/
|
%br/
|
||||||
= form.text_field :required_users, :size => 3
|
= form.text_field :required_users, :size => 3
|
||||||
%p
|
%p
|
||||||
%b= form.label :workgroup
|
%b Arbeitsgruppe
|
||||||
%br/
|
%br/
|
||||||
= form.select :workgroup_id, Workgroup.all(:order => 'name').collect {|g| [ g.name, g.id ] }, { :include_blank => true }
|
= form.select :workgroup_id, Workgroup.all(:order => 'name').collect {|g| [ g.name, g.id ] }, { :include_blank => true }
|
||||||
%p
|
%p
|
||||||
%b= form.label :due_date
|
%b Fälligkeit
|
||||||
%br/
|
%br/
|
||||||
= form.date_select :due_date, :start_year => 2007, :include_blank => true
|
= form.date_select :due_date, :start_year => 2007, :include_blank => true
|
|
@ -6,6 +6,7 @@
|
||||||
= submit_tag "Aufgabe erstellen"
|
= submit_tag "Aufgabe erstellen"
|
||||||
|
|
||||||
#workgroup_members{:style => "padding-left:41em"}
|
#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
|
#list
|
||||||
= render :partial => "shared/workgroup_members"
|
= render :partial => "shared/workgroup_members"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
ActionController::Routing::Routes.draw do |map|
|
ActionController::Routing::Routes.draw do |map|
|
||||||
|
|
||||||
|
map.logout '/logout', :controller => 'login', :action => 'logout'
|
||||||
map.my_profile '/home/profile', :controller => 'home', :action => 'profile'
|
map.my_profile '/home/profile', :controller => 'home', :action => 'profile'
|
||||||
map.my_ordergroup '/home/ordergroup', :controller => 'home', :action => 'ordergroup'
|
map.my_ordergroup '/home/ordergroup', :controller => 'home', :action => 'ordergroup'
|
||||||
map.my_tasks '/home/tasks', :controller => 'tasks', :action => 'myTasks'
|
map.my_tasks '/home/tasks', :controller => 'tasks', :action => 'myTasks'
|
||||||
|
|
Loading…
Reference in a new issue