mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
107279984-credit_balance_views
This commit is contained in:
parent
9fbeeb70a2
commit
0fd682c6b9
5 changed files with 19 additions and 3 deletions
|
@ -55,6 +55,7 @@
|
|||
%th{class: 'col-xs-2'}
|
||||
= sort_link(@q, 'sum')
|
||||
%tbody
|
||||
-total = 0
|
||||
- @account_activities.each do |x|
|
||||
%tr
|
||||
%td= link_to(x.account.registrar.try(:code), admin_registrar_path(x.account.registrar))
|
||||
|
@ -63,7 +64,15 @@
|
|||
%td= l(x.created_at)
|
||||
- c = x.sum > 0.0 ? 'text-success' : 'text-danger'
|
||||
- s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}"
|
||||
-total += x.sum
|
||||
%td{class: c}= s
|
||||
- if @account_activities.count > 0
|
||||
%tr
|
||||
%td
|
||||
%td
|
||||
%td
|
||||
%td{class: 'text-right'}= t(:total)
|
||||
%td{class: 'text-success'}= total > 0 ? "+#{total} EUR" : "#{total} EUR"
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @account_activities
|
||||
|
|
|
@ -8,15 +8,18 @@
|
|||
%table.table.table-hover.table-bordered.table-condensed
|
||||
%thead
|
||||
%tr
|
||||
%th{class: 'col-xs-6'}
|
||||
%th{class: 'col-xs-4'}
|
||||
= sort_link(@q, 'name')
|
||||
%th{class: 'col-xs-6'}
|
||||
%th{class: 'col-xs-4'}
|
||||
= sort_link(@q, 'reg_no', t(:reg_no))
|
||||
%th{class: 'col-xs-4'}
|
||||
= t(:credit_balance)
|
||||
%tbody
|
||||
- @registrars.each do |x|
|
||||
%tr
|
||||
%td= link_to(x, [:admin, x])
|
||||
%td= x.reg_no
|
||||
%td= "#{x.balance}"
|
||||
.row
|
||||
.col-md-12
|
||||
= paginate @registrars
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
%dt= t(:id)
|
||||
%dd= @registrar.code
|
||||
|
||||
%dt= t(:credit_balance)
|
||||
%dd= @registrar.balance
|
||||
|
||||
.col-md-6
|
||||
.panel.panel-default
|
||||
.panel-heading
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue