change table order
This commit is contained in:
parent
4173275e96
commit
c1d4b1c649
2 changed files with 14 additions and 14 deletions
|
@ -31,11 +31,11 @@ module DataTable
|
|||
|
||||
def selection_to_json(user, selection)
|
||||
{ data: selection.map { |transaction| {
|
||||
time: transaction.created_at,
|
||||
amount: transaction.signed_amount_for(user),
|
||||
peer: transaction.peer_of(user).try(:name),
|
||||
issuer: transaction.issuer.name,
|
||||
message: transaction.message,
|
||||
peer: transaction.peer_of(user).try(:name),
|
||||
time: transaction.created_at
|
||||
} }
|
||||
}
|
||||
end
|
||||
|
|
|
@ -2,26 +2,26 @@
|
|||
%table#transactions.display.responsive.no-wrap{data: { source: user_path(@user) }}
|
||||
%thead
|
||||
%tr
|
||||
%th Time
|
||||
%th Amount
|
||||
%th Peer
|
||||
%th Issuer
|
||||
%th Message
|
||||
%th Peer
|
||||
%th Time
|
||||
%tr
|
||||
%td.bound.input-listen
|
||||
%input.lower-bound{type: 'date', placeholder: 'after'}
|
||||
= "<= Time <="
|
||||
%input.upper-bound{type: 'date', placeholder: 'before'}
|
||||
%td.bound.input-listen
|
||||
%input.lower-bound{type: 'number', placeholder: 'lower', class: 'pure-u-1-5'}
|
||||
= "<= Amount <="
|
||||
%input.upper-bound{type: 'number', placeholder: 'upper', class: 'pure-u-1-5'}
|
||||
%td.input-listen
|
||||
%input{type: 'text', placeholder: 'Filter on Peer'}
|
||||
%td.input-listen
|
||||
%input{type: 'text', placeholder: 'Filter on Issuer'}
|
||||
%td.input-listen
|
||||
%input{type: 'text', placeholder: 'Filter on Message'}
|
||||
%td.input-listen
|
||||
%input{type: 'text', placeholder: 'Filter on Peer'}
|
||||
%td.bound.input-listen
|
||||
%input.lower-bound{type: 'date', placeholder: 'after'}
|
||||
= "<= Time <="
|
||||
%input.upper-bound{type: 'date', placeholder: 'before'}
|
||||
%tbody
|
||||
|
||||
:javascript
|
||||
|
@ -33,14 +33,14 @@
|
|||
ordering: false,
|
||||
ajax: $('#transactions').data('source'),
|
||||
pagingType: 'full_numbers',
|
||||
autoWidth: false,
|
||||
columns: [
|
||||
{ data: 'time', name: 'Time' },
|
||||
{ data: 'amount', name: 'Amount' },
|
||||
{ data: 'peer', name: 'Peer' },
|
||||
{ data: 'issuer', name: 'Issuer' },
|
||||
{ data: 'message', name: 'Message' },
|
||||
{ data: 'peer', name: 'Peer' },
|
||||
{ data: 'time', name: 'Time' }
|
||||
],
|
||||
autoWidth: false
|
||||
]
|
||||
});
|
||||
|
||||
var tds = $('.input-listen');
|
||||
|
|
Loading…
Reference in a new issue