Add views for bank items

This commit is contained in:
Martin Lensment 2015-04-13 18:36:08 +03:00
parent b5521594ce
commit 3398bcd845
16 changed files with 248 additions and 22 deletions

View file

@ -0,0 +1,28 @@
.row
.col-sm-6
%h2.text-center-xs= t('bank_statements')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('import'), new_admin_bank_statement_path, class: 'btn btn-primary')
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= sort_link(@q, 'created_at', t('imported_at'))
%th{class: 'col-xs-2'}
= sort_link(@q, 'bank_code')
%th{class: 'col-xs-2'}
= sort_link(@q, 'iban', t('iban').upcase)
%tbody
- @bank_statements.each do |x|
%tr
%td= link_to(l(x.created_at), admin_bank_statement_path(x))
%td= x.bank_code
%td= x.iban
.row
.col-md-12
= paginate @bank_statements

View file

@ -0,0 +1,21 @@
.row
.col-sm-6
%h2.text-center-xs= t('import_th6_bank_statement')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_bank_statements'), admin_bank_statements_path, class: 'btn btn-primary')
%hr
= form_for([:admin, @bank_statement], multipart: true) do |f|
= render 'shared/full_errors', object: @bank_statement
.row
.col-md-12.text-left
.form-group
= f.label :th6_file
= f.file_field :th6_file
%hr
.row
.col-md-12.text-right
= button_tag(t('save'), class: 'btn btn-primary')

View file

@ -0,0 +1,28 @@
.row
.col-sm-6
%h2.text-center-xs= t('bank_statement')
.col-sm-6
%h2.text-right.text-center-xs
= link_to(t('back_to_bank_statements'), admin_bank_statements_path, class: 'btn btn-primary')
%hr
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-2'}
= sort_link(@q, 'buyer_name')
%th{class: 'col-xs-2'}
= sort_link(@q, 'paid_at')
%th{class: 'col-xs-2'}
= sort_link(@q, 'sum', t('sum'))
%tbody
- @bank_transactions.each do |x|
%tr
%td= link_to(x.buyer_name, [:admin, x])
%td= l(x.paid_at)
%td= x.sum
.row
.col-md-12
= paginate @bank_transactions