<div class="row"> <div class="col-md-12"> <h1><%= _('List of users') %></h1> <p class="text-justify"> <%= _('Below is a list of users registered for your organisation. You can sort the data by each field.')%> </p> </div> </div> <div class="row"> <div class="col-md-12"> <div class="table-responsive"> <table class="table tablesorter table-hover table-bordered"> <thead> <% if scope.count > TABLE_FILTER_MIN_ROWS %> <tr> <td> <%= render(partial: "shared/table_filter", locals: {path: admin_index_users_path, placeholder: _('Filter users')}) %> </td> </tr> <% end %> <tr> <th><%= _('Name') %></th> <th><%= _('Email address') %></th> <th class="text-center"><%= _('Last logged in') %></th> <th class="text-center"><%= _('How many plans?') %></th> <th class="text-center"><%= _('Privileges') %></th> </tr> </thead> <tbody> <% scope.each do |user| %> <% if !user.nil? then%> <tr> <td> <% if !user.name.nil? %> <%= user.name(false) %> <% end %> </td> <td> <%= user.email %> </td> <td class="text-center"> <% if !user.last_sign_in_at.nil? %> <%= l user.last_sign_in_at.to_date, :formats => :short %> <% end %> </td> <td class="text-center"> <% if !user.roles.nil? %> <%= user.roles.length %> <% end %> </td> <td class="text-center"> <% unless current_user == user %> <% b_label = _('Edit')%> <%= link_to b_label, admin_grant_permissions_user_path(user)%> <% end %> </td> </tr> <% end %> <% end %> </tbody> </table> </div> </div> </div>