app/views/admin/users/index.html.erb
<div class='page-header'>
<div class='container'>
<h1 class='pull-left'>User Management</h1>
<div class='pull-right'>
<%= link_to 'New User', new_admin_user_path, class: 'btn btn-primary' %>
</div>
</div>
</div>
<div class='container'>
<div class='panel panel-default'>
<div class='panel-body table-responsive'>
<table class='table table-default'>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Contact number</th>
<th>Pending Cases</th>
<th>Closed Cases</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<%- @users.each do |user| %>
<tr>
<td><%= link_to user.name, admin_user_path(user) %> </td>
<td><%= mail_to user.email %> </td>
<td><%= user.contact_number %></td>
<td><%= user.case_files.pending.count %></td>
<td><%= user.case_files.closed.count %></td>
<td><%= user.status.titleize %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<div class='panel-footer'>
Total <%= @users.count %> users.
</div>
</div>
</div>