Fixed finance module to work with bootstrap design.
This commit is contained in:
parent
16de9124fe
commit
0236fb5a60
55 changed files with 440 additions and 486 deletions
|
|
@ -2,5 +2,6 @@
|
|||
%td
|
||||
= 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]'
|
||||
%td= link_to icon(:delete), "#", :title => "Gruppe enfernen", 'data-remove-transaction' => true
|
||||
%td= text_field_tag 'financial_transactions[][amount]', nil, class: 'input-small'
|
||||
%td= link_to "Entfernen", "#", :title => "Gruppe enfernen", 'data-remove-transaction' => true,
|
||||
class: 'btn btn-small'
|
||||
|
|
@ -1,26 +1,17 @@
|
|||
- if @total == 0
|
||||
%p Keine gefunden
|
||||
- else
|
||||
%p
|
||||
Anzahl gefundener Transaktionen:
|
||||
%b= @total
|
||||
%p
|
||||
= pagination_links_remote @financial_transactions, :update => 'transactions', |
|
||||
:params => {:sort => params[:sort], :query => params['query']} |
|
||||
%table
|
||||
%thead
|
||||
- if @ordergroup.financial_transactions.count > 20
|
||||
= items_per_page
|
||||
= pagination_links_remote @financial_transactions
|
||||
%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"
|
||||
%tbody
|
||||
- @financial_transactions.each do |t|
|
||||
%tr
|
||||
<td #{sort_td_class_helper("date")}>
|
||||
\#{sort_link_helper "Datum", "date"}
|
||||
%td Wer
|
||||
<td #{sort_td_class_helper("note")}>
|
||||
\#{sort_link_helper "Notiz", "note"}
|
||||
<td #{sort_td_class_helper("amount")}>
|
||||
\#{sort_link_helper "Betrag", "amount"}
|
||||
%tbody
|
||||
- @financial_transactions.each do |t|
|
||||
%tr{:class => cycle("even","odd")}
|
||||
%td= format_time(t.created_on)
|
||||
%td= h t.user.nil? ? '??' : t.user.nick
|
||||
%td= h t.note
|
||||
%td.currency{:style => "color:#{t.amount < 0 ? 'red' : 'black'}; width:5em"}= number_to_currency(t.amount)
|
||||
%td= format_time(t.created_on)
|
||||
%td= h t.user.nil? ? '??' : t.user.nick
|
||||
%td= h t.note
|
||||
%td.currency{:style => "color:#{t.amount < 0 ? 'red' : 'black'}; width:5em"}= number_to_currency(t.amount)
|
||||
|
|
|
|||
|
|
@ -1,18 +1,16 @@
|
|||
- title "Kontoauszug für #{@ordergroup.name}"
|
||||
%p
|
||||
%b
|
||||
Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
||||
%span{:style => "color:grey"}
|
||||
(zuletzt aktualisiert vor #{distance_of_time_in_words(Time.now, @ordergroup.account_updated)})
|
||||
.left_column{:style => "width:100%"}
|
||||
.box_title
|
||||
%h2 Überweisungen
|
||||
.column_content
|
||||
= form_tag finance_ordergroup_transactions_path(@ordergroup), :method => :get, :style=>"display:inline;", :id => 'ordergroup_search',
|
||||
:remote => true, 'data-submit-onchange' => true do
|
||||
%label{:for => 'article_name'} Suche in Notiz:
|
||||
= text_field_tag :query, params[:query], :size => 10
|
||||
#transactions
|
||||
= render :partial => "transactions"
|
||||
%p= link_to 'Neue Transaktion', new_finance_ordergroup_transaction_path(@ordergroup)
|
||||
= link_to 'Gruppenübersicht', finance_ordergroups_path
|
||||
|
||||
- content_for :sidebar do
|
||||
%p= link_to 'Neue Transaktion anlegen', new_finance_ordergroup_transaction_path(@ordergroup), class: 'btn btn-primary'
|
||||
.well.well-small
|
||||
%strong Kontostand: #{number_to_currency(@ordergroup.account_balance)}
|
||||
%br/
|
||||
%small (zuletzt aktualisiert vor #{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 ...'
|
||||
|
||||
|
||||
#transactions= render 'transactions'
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
- title "Mehrer Konten aktualisieren"
|
||||
- title "Mehrere Konten aktualisieren"
|
||||
|
||||
- content_for :head do
|
||||
- content_for :javascript do
|
||||
:javascript
|
||||
var ordergroup = "#{escape_javascript(render('ordergroup'))}"
|
||||
|
||||
|
|
@ -16,19 +16,23 @@
|
|||
});
|
||||
});
|
||||
|
||||
- form_tag finance_create_transaction_collection_path do
|
||||
- content_for :sidebar do
|
||||
.well.well-small
|
||||
Hier kannst Du mehrere Konten gleichzeitig aktualsieren.
|
||||
Z.B. alle Überweisungen der Bestellgruppen aus einem Kontoauszug.
|
||||
|
||||
= form_tag finance_create_transaction_collection_path do
|
||||
%p
|
||||
%b Notiz
|
||||
= text_field_tag :note
|
||||
= text_field_tag :note, params[:note], class: 'input-xlarge', required: 'required'
|
||||
%p
|
||||
%table#ordergroups{:style => "width:20em"}
|
||||
%tr
|
||||
%th Bestellgruppe
|
||||
%th Betrag
|
||||
= render :partial => 'ordergroup', :collection => [1, 2, 3]
|
||||
|
||||
%p
|
||||
= link_to "Neue Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true
|
||||
%p
|
||||
= submit_tag "Transaktionen speichern"
|
||||
= link_to "Weitere Bestellgruppe hinzufügen", '#', 'data-add-transaction' => true, class: 'btn'
|
||||
.form-actions
|
||||
= submit_tag "Transaktionen speichern", class: 'btn btn-primary'
|
||||
= link_to "oder abbrechen", finance_ordergroups_path
|
||||
Loading…
Add table
Add a link
Reference in a new issue