.row .col-md-12 .page-header %h1 Users - if @users = "(#{@users.length})" - if can? :create, User .pull-right = link_to 'Add User', new_admin_user_path, :class => 'button btn btn-default btn-info' .row .col-md-12.table-responsive %table.datatable#users{ data: { source: admin_users_path(format: :json) } } %thead %th{ width: '0' } ID %th{ width: '0' } Confirmed? %th{ width: '0' } Email %th{ width: '50%' } Name %th{ width: '0' } Conferences Attended %th{ width: '50%' } Roles %th{ width: '0' } Actions %tbody :javascript $(function () { $('#users.datatable').DataTable({ "processing": true, "serverSide": true, "ajax": $('#users.datatable').data('source'), "drawCallback": function(settings) { checkboxSwitch("[class='switch-checkbox']"); }, "columns": [ { "data": "id" }, { "data": "confirmed_at", "render": function (data, type, row, meta) { return '' }, "searchable": false }, { "data": "email" }, { "data": "name", "className": "truncate", "render": function (data, type, row, meta) { return ''+data+'' } }, { "data": "attended" }, { "data": "roles", "className": "truncate" , "render": function (data, type, row, meta) { return ''+data+'' } }, { "data": null, "className": "actions", "sortable": false, "render": function (data, type, row, meta) { return '
'; } } ] }); });