diff --git a/app/views/user_admin/index.html.haml b/app/views/user_admin/index.html.haml --- a/app/views/user_admin/index.html.haml +++ b/app/views/user_admin/index.html.haml @@ -1,4 +1,4 @@ -%h1 Listing users +%h1 Users .panel.panel-primary .panel-title.panel-heading @@ -41,8 +41,8 @@ %p = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '} = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '} + = link_to 'Bulk Manage', bulk_manage_user_admin_path , { class: 'btn btn-default btn-info'} = link_to 'View administrators',{ :action => 'admin'}, { class: 'btn btn-default '} - = link_to 'Bulk Manage', bulk_manage_user_admin_path , { class: 'btn btn-default '} = link_to 'Random passwords',{ :action => 'random_all_passwords'}, { class: 'btn btn-default '} = link_to 'View active users',{ :action => 'active'}, { class: 'btn btn-default '} = link_to 'Mass mailing',{ :action => 'mass_mailing'}, { class: 'btn btn-default '} @@ -56,17 +56,17 @@ = link_to "[#{contest.name}]", :action => 'contests', :id => contest.id = link_to "[no contest]", :action => 'contests', :id => 'none' -Total #{@user_count} users | -- if !@paginated - Display all users. - \#{link_to '[show in pages]', :action => 'index', :page => '1'} -- else - Display in pages. - \#{link_to '[display all]', :action => 'index', :page => 'all'} | - \#{will_paginate @users, :container => false} +-# Total #{@user_count} users | +-# - if !@paginated +-# Display all users. +-# \#{link_to '[show in pages]', :action => 'index', :page => '1'} +-# - else +-# Display in pages. +-# \#{link_to '[display all]', :action => 'index', :page => 'all'} | +-# \#{will_paginate @users, :container => false} -%table.table.table-hover.table-condense +%table.table.table-hover.table-condense.datatable %thead %th Login %th Full name @@ -95,7 +95,12 @@ %td= link_to 'Clear IP', {:action => 'clear_last_ip', :id => user, :page=>params[:page]}, :confirm => 'This will reset last logging in ip of the user, are you sure?', class: 'btn btn-default btn-xs btn-block' %td= link_to 'Show', {:action => 'show', :id => user}, class: 'btn btn-default btn-xs btn-block' %td= link_to 'Edit', {:action => 'edit', :id => user}, class: 'btn btn-default btn-xs btn-block' - %td= link_to 'Destroy', { :action => 'destroy', :id => user }, :confirm => 'Are you sure?', :method => :delete, class: 'btn btn-danger btn-xs btn-block' + %td= link_to 'Destroy', user_admin_destroy_path(user), data: {confirm: 'Are you sure?'}, method: :delete, class: 'btn btn-danger btn-xs btn-block' %br/ = link_to '+ New user', { :action => 'new' }, { class: 'btn btn-success '} = link_to '+ New list of users', { :action => 'new_list' }, { class: 'btn btn-success '} + +:javascript + $('.datatable').DataTable({ + 'pageLength': 50 + });