<div class="row ">
    <nav class="breadcrumb">  
       <a class="breadcrumb-item active" href="<%= dashboard_path %>">Home</a>   
       <a class="breadcrumb-item active" href="#">Users</a>       
    </nav>
</div>  
<div class="row  top-content">
    <span style="float: right">
        <%= link_to t('.new', :default => t("helpers.links.new")),new_user_path,:class => 'btn btn-primary' %>
    </span> 
</div>
<div class="row content"> 
    <div class="card">     
      <div class="card-header">              
            <strong>User List</strong>                       
        </div>   
        <div class="card-block">
            <table class="table" style="border-top:none">
                <thead>
                  <tr>                 
                  <th>Name</th> 
                  <th>User Type</th>        
                  <th>Nrc</th>
                  <th>Email</th>
                  <th>Phone</th>
                  <th>Status</th>
                  <th>Action</th>                        
                  </tr>
                </thead>
                <tbody>                 
                  <% @users.each do |user| %>               
                    <tr>                       
                      <td><%= user.name rescue '' %></td>  
                      <td><%= user.user_type rescue '' %></td>     
                      <td><%= user.nrc rescue '' %></td>    
                      <td><%= user.email rescue '' %></td>   
                      <td><%= user.phone rescue '' %></td>  
                      <td><%= user.address rescue '' %></td>
                      <td></td>   
                      <td>
                        <%= link_to 'Detail',
                          user_path(user), :class => 'btn btn-primary btn-sm' %>                            
                        <%= link_to 'Edit',
                                    edit_user_path(user), :class => 'btn btn-primary btn-sm' %>  
                        <%= link_to 'Delete', user_path(user), method: :delete, data: { confirm: 'Are you sure?' },:class => 'btn btn-primary btn-sm' %>
                      </td>                     
                    </tr>
                  <% end %>
                </tbody>
            </table> 
            <%=paginate   @users %>
        </div>
    </div>
</div>