2018-09-14 19:33:27 +02:00
|
|
|
.pull-right
|
2021-02-08 01:07:10 +01:00
|
|
|
.btn-group
|
|
|
|
= link_to url_for(query: params[:query], format: :csv), class: 'btn' do
|
|
|
|
= glyph :download
|
|
|
|
CSV
|
2018-09-14 19:33:27 +02:00
|
|
|
- if @bank_transactions.total_pages > 1
|
|
|
|
.btn-group= items_per_page wrap: false
|
|
|
|
= pagination_links_remote @bank_transactions
|
|
|
|
%table.table.table-striped
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th= sort_link_helper heading_helper(BankTransaction, :date), "date"
|
|
|
|
%th= heading_helper(BankTransaction, :text)
|
|
|
|
%th= heading_helper(BankTransaction, :reference)
|
|
|
|
%th= sort_link_helper heading_helper(BankTransaction, :amount), "amount"
|
|
|
|
%th= sort_link_helper heading_helper(BankTransaction, :financial_link), "financial_link"
|
|
|
|
%tbody
|
|
|
|
- @bank_transactions.each do |t|
|
|
|
|
%tr
|
|
|
|
%td= h link_to format_date(t.date), finance_bank_transaction_path(t)
|
|
|
|
%td= h(t.text).gsub("\n", "<br>").html_safe
|
|
|
|
%td= h t.reference
|
|
|
|
%td.numeric{style: 'width:5em'}= format_currency t.amount
|
|
|
|
%td
|
|
|
|
- if t.financial_link
|
|
|
|
= link_to t('ui.show'), finance_link_path(t.financial_link)
|
2018-10-11 22:16:50 +02:00
|
|
|
- else
|
|
|
|
= link_to t('.add_financial_link'), finance_links_path(bank_transaction: t.id),
|
|
|
|
method: :post, class: 'btn btn-success btn-mini'
|