AlchemyCMS/alchemy_cms

View on GitHub
app/views/alchemy/admin/dashboard/widgets/_users.html.erb

Summary

Maintainability
Test Coverage
<div class="widget users">
  <table class="list">
    <tr>
      <th colspan="2"><%= Alchemy.t('Who else is online') %></th>
    </tr>
  <% if @online_users.blank? %>
    <tr>
      <td colspan="2"><%= Alchemy.t('no users') %></td>
    </tr>
  <% else %>
    <% @online_users.each do |user| %>
    <tr class="<%= cycle('even', 'odd') %>">
      <td><%= user.name %></td>
      <td>
        <small><%= user.human_roles_string %></small>
      </td>
    </tr>
    <% end %>
  <% end %>
  </table>
</div>