mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Add sorting feature to activities #2691
This commit is contained in:
parent
ca2a2db9ad
commit
af40038160
1 changed files with 3 additions and 6 deletions
|
@ -40,21 +40,18 @@
|
||||||
%tr
|
%tr
|
||||||
%th{class: 'col-xs-5'}
|
%th{class: 'col-xs-5'}
|
||||||
= sort_link(@q, 'description')
|
= sort_link(@q, 'description')
|
||||||
|
%th{class: 'col-xs-2'}
|
||||||
|
= sort_link(@q, 'activity_type')
|
||||||
%th{class: 'col-xs-3'}
|
%th{class: 'col-xs-3'}
|
||||||
= sort_link(@q, 'created_at', t(:receipt_date))
|
= sort_link(@q, 'created_at', t(:receipt_date))
|
||||||
%th{class: 'col-xs-2'}
|
|
||||||
= sort_link(@q, 'invoice_id', t(:invoice))
|
|
||||||
%th{class: 'col-xs-2'}
|
%th{class: 'col-xs-2'}
|
||||||
= sort_link(@q, 'sum')
|
= sort_link(@q, 'sum')
|
||||||
%tbody
|
%tbody
|
||||||
- @account_activities.each do |x|
|
- @account_activities.each do |x|
|
||||||
%tr
|
%tr
|
||||||
%td= x.description.present? ? x.description : '-'
|
%td= x.description.present? ? x.description : '-'
|
||||||
|
%td= x.activity_type ? t(x.activity_type) : ''
|
||||||
%td= l(x.created_at)
|
%td= l(x.created_at)
|
||||||
- if x.invoice
|
|
||||||
%td= link_to(x.invoice, [:registrar, x.invoice])
|
|
||||||
- else
|
|
||||||
%td -
|
|
||||||
- c = x.sum > 0.0 ? 'text-success' : 'text-danger'
|
- c = x.sum > 0.0 ? 'text-success' : 'text-danger'
|
||||||
- s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}"
|
- s = x.sum > 0.0 ? "+#{x.sum} #{x.currency}" : "#{x.sum} #{x.currency}"
|
||||||
%td{class: c}= s
|
%td{class: c}= s
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue