i18n financial_transactions + controller
This commit is contained in:
parent
8722a5ed36
commit
640e9799aa
7 changed files with 59 additions and 27 deletions
|
|
@ -3,5 +3,5 @@
|
|||
= select_tag 'financial_transactions[][ordergroup_id]',
|
||||
options_for_select(Ordergroup.order(:name).all.map { |g| [ g.name, g.id ] })
|
||||
%td= text_field_tag 'financial_transactions[][amount]', nil, class: 'input-small'
|
||||
%td= link_to "Entfernen", "#", :title => "Gruppe enfernen", 'data-remove-transaction' => true,
|
||||
%td= link_to t('.remove'), "#", :title => t('.remove_group'), 'data-remove-transaction' => true,
|
||||
class: 'btn btn-small'
|
||||
|
|
@ -4,10 +4,10 @@
|
|||
%table.table.table-striped
|
||||
%thead
|
||||
%tr
|
||||
%td= sort_link_helper "Datum", "date"
|
||||
%td Wer
|
||||
%td= sort_link_helper "Notiz", "note"
|
||||
%td= sort_link_helper "Betrag", "amount"
|
||||
%td= sort_link_helper t('.date'), "date"
|
||||
%td= t('.who')
|
||||
%td= sort_link_helper t('.note'), "note"
|
||||
%td= sort_link_helper t('amount'), "amount"
|
||||
%tbody
|
||||
- @financial_transactions.each do |t|
|
||||
%tr
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
- title "Kontoauszug für #{@ordergroup.name}"
|
||||
- title t('.title', name: @ordergroup.name)
|
||||
|
||||
- content_for :actionbar do
|
||||
= link_to 'Neue Transaktion anlegen', new_finance_ordergroup_transaction_path(@ordergroup), class: 'btn btn-primary'
|
||||
= link_to t('.new_transaction'), new_finance_ordergroup_transaction_path(@ordergroup), class: 'btn btn-primary'
|
||||
|
||||
- content_for :sidebar do
|
||||
.well.well-small
|
||||
%strong Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
||||
%strong= t('.balance', balance: number_to_currency(@ordergroup.account_balance))
|
||||
%br/
|
||||
%small (zuletzt aktualisiert vor #{distance_of_time_in_words(Time.now, @ordergroup.account_updated)})
|
||||
%small= t('.last_updated_at', when: distance_of_time_in_words(Time.now, @ordergroup.account_updated))
|
||||
.well.well-small
|
||||
= form_tag finance_ordergroup_transactions_path(@ordergroup), :method => :get, :remote => true,
|
||||
'data-submit-onchange' => true, class: 'form-search' do
|
||||
= text_field_tag :query, params[:query], class: 'input-medium search-query',
|
||||
placeholder: 'Suchen ...'
|
||||
placeholder: t('.search_placeholder')
|
||||
|
||||
|
||||
#transactions= render 'transactions'
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
- title "Neue Transaktion"
|
||||
- title t('.title')
|
||||
|
||||
%p Hier kannst du der Bestellgruppe <b>#{@ordergroup.name}</b> Geld gutschreiben/abziehen.
|
||||
%p!= t('.paragraph', name: @ordergroup.name)
|
||||
|
||||
= simple_form_for @financial_transaction, :url => finance_ordergroup_transactions_path(@ordergroup),
|
||||
:validate => true do |f|
|
||||
|
|
@ -9,4 +9,4 @@
|
|||
= f.input :note, :as => :text
|
||||
.form-actions
|
||||
= f.submit class: 'btn btn-primary'
|
||||
= link_to "oder abbrechen", finance_ordergroup_transactions_path(@ordergroup)
|
||||
= link_to t('.or_cancel'), finance_ordergroup_transactions_path(@ordergroup)
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
- title "Mehrere Konten aktualisieren"
|
||||
- title t('.title')
|
||||
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
|
|
@ -17,22 +17,20 @@
|
|||
});
|
||||
|
||||
- content_for :sidebar do
|
||||
.well.well-small
|
||||
Hier kannst Du mehrere Konten gleichzeitig aktualsieren.
|
||||
Z.B. alle Überweisungen der Bestellgruppen aus einem Kontoauszug.
|
||||
.well.well-small= t('.sidebar')
|
||||
|
||||
= form_tag finance_create_transaction_collection_path do
|
||||
%p
|
||||
%b Notiz
|
||||
%b= t('.note')
|
||||
= text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required'
|
||||
%p
|
||||
%table#ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th Bestellgruppe
|
||||
%th Betrag
|
||||
%th= t('.ordergroup')
|
||||
%th= t('.amount')
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
%p
|
||||
= link_to "Weitere Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true, class: 'btn'
|
||||
= link_to t('.new_ordergroup'), '#', 'data-add-transaction' => true, class: 'btn'
|
||||
.form-actions
|
||||
= submit_tag "Transaktionen speichern", class: 'btn btn-primary'
|
||||
= link_to "oder abbrechen", finance_ordergroups_path
|
||||
= submit_tag t('.save'), class: 'btn btn-primary'
|
||||
= link_to t('.or_cancel'), finance_ordergroups_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue