tab/app/views/users/show.html.haml

45 lines
1,021 B
Plaintext
Raw Normal View History

2015-09-08 17:39:13 +00:00
%h2= @user.name
2015-09-08 18:45:32 +00:00
%table#transactions.display{data: { source: user_path(@user) }}
2015-09-08 17:39:13 +00:00
%thead
%tr
%td Amount
%td Origin
%td Message
%td Peer
%td Time
2015-09-08 17:39:13 +00:00
%tr
%th Amount
%th Origin
%th Message
2015-09-08 18:45:32 +00:00
%th Peer
2015-09-08 17:39:13 +00:00
%th Time
%tbody
2015-09-08 18:45:32 +00:00
:javascript
$(document).ready(function() {
$('#transactions').dataTable({
processing: true,
serverSide: true,
searching: true,
ordering: false,
ajax: $('#transactions').data('source'),
pagingType: 'full_numbers',
columns: [
{ data: 'amount', name: 'Amount' },
{ data: 'origin', name: 'Origin' },
{ data: 'message', name: 'Message' },
{ data: 'peer', name: 'Peer' },
{ data: 'time', name: 'Time' }
]
}).columnFilter({
sPlaceHolder: 'head:before',
aoColumns: [
{ type: 'number-range' },
{ type: 'text' },
{ type: 'text' },
{ type: 'text' },
{ type: 'date-range' }
]
});
2015-09-08 18:45:32 +00:00
});