YaleSTC/shifts

View on GitHub
app/views/users/_user_list.html.erb

Summary

Maintainability
Test Coverage
<table id="user_list" class="tablesorter">
  <thead>
    <tr>
      <th align="left">Login</th>
      <th align="left">First Name</th>
      <th align="left">Last Name</th>
      <% unless mobile_device?%>
      <th align="left">Nickname</th>
      <th>Employee ID</th>
      <th>Email</th>
      <% end %>
    </tr>
  </thead>
  <tbody>
    <% for user in @users %>
      <tr <%= !user.is_active?(current_department) ? "class='disabled'".html_safe : "" %> id="user<%= user.id %>">
        <td><%= link_to user.login, edit_user_path(user.id) %></td>
        <td><%= user.first_name %></td>
        <td><%= user.last_name %></td>
        <% unless mobile_device?%>
        <td><%= user.nick_name %></td>
        <td><%= user.employee_id %></td>
        <td><%= user.email %></td>
        <td><%= deactivate_link(user) %></td>
        <% end %>
      </tr>
    <% end %>
  </tbody>
</table>