app/views/admin/bank_statements/index.haml
- content_for :actions do
= link_to(t(:add), new_admin_bank_statement_path, class: 'btn btn-primary')
= render 'shared/title', name: t(:bank_statements)
= render 'application/pagination'
.row
.col-md-12
.table-responsive
%table.table.table-hover.table-bordered.table-condensed
%thead
%tr
%th{class: 'col-xs-3'}
= sort_link(@q, 'created_at', t(:imported_at))
%th{class: 'col-xs-3'}
= sort_link(@q, 'bank_code')
%th{class: 'col-xs-3'}
= sort_link(@q, 'iban', t('iban').upcase)
/ TODO: Make this searchable by caching the status to the database
%th{class: 'col-xs-3'}
= t(:status)
%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
- sc = 'text-success' if x.fully_binded?
- sc = 'text-warning' if x.partially_binded?
- sc = 'text-danger' if x.not_binded?
%td{class: sc}= t(x.status)
.row
.col-md-6
= paginate @bank_statements
.col-md-6.text-right
.pagination
= t(:result_count, count: @q.result.count)