Sha256: fbde582bcb5fd54fa1fb64c9274966578b35d7315e6f759bad58ecae60ac0548

Contents?: true

Size: 1.64 KB

Versions: 27

Compression:

Stored size: 1.64 KB

Contents

<table class="users list">
  <tr>
    <th>Name</th>
    <th>Email</th>
    <th>Can access</th>
    <th>Last seen</th>
    <th></th>
  </tr>
<% @invites.each do |invite| %>
  <tr class="invite">
    <td></td>
    <td>
      <%= invite.email %>
    </td>
    <td>
      <%= invite.roles.map(&:to_s).sort.to_sentence %>
    </td>
    <td>
      <% if invite.sent_at? %>
        Invited
        <%= time_ago_in_words(invite.sent_at) %> ago
      <% end %>
    </td>
    <td>
      <% if current_user.role?(:users) %>
        <%= link_to("View invite",
                    admin_invite_with_token_url(invite, invite.token)) %> /
        <%= link_to("Cancel invite",
                    [:admin, invite],
                    method: 'delete',
                    data: { confirm: "Are you sure?" },
                    class: 'delete') %>
      <% end %>
    </td>
  </tr>
<% end %>
<% @users.each do |user| -%>
  <tr class="user-<%= user.id %>">
    <td>
      <strong><%= link_to user.name, admin_user_url( user ) %></strong>
      <% if policy(user).edit? %>
        (<%= link_to "edit", edit_admin_user_url( user ), class: :edit %>)
      <% end %>
    </td>
    <td>
      <%= user.email %>
    </td>
    <td><%= user.roles.map(&:to_s).sort.to_sentence %></td>
    <td>
      <% if user.online? -%>
        <strong>Online now</strong>
      <% elsif user.last_login_at -%>
        <%= time_ago_in_words( user.last_login_at ) %> ago
      <% else %>
        Not logged in yet
      <% end -%>
    </td>
    <td class="note">
      <%=
        notes = []
        notes << "Deactivated" unless user.activated?
        notes.join( ", " )
      %>
    </td>
  </tr>
<% end -%>
</table>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pages_core-3.14.0 app/views/admin/users/_list.html.erb
pages_core-3.13.0 app/views/admin/users/_list.html.erb
pages_core-3.12.7 app/views/admin/users/_list.html.erb
pages_core-3.12.6 app/views/admin/users/_list.html.erb
pages_core-3.12.5 app/views/admin/users/_list.html.erb
pages_core-3.12.4 app/views/admin/users/_list.html.erb
pages_core-3.12.3 app/views/admin/users/_list.html.erb
pages_core-3.12.2 app/views/admin/users/_list.html.erb
pages_core-3.12.1 app/views/admin/users/_list.html.erb
pages_core-3.12.0 app/views/admin/users/_list.html.erb
pages_core-3.11.3 app/views/admin/users/_list.html.erb
pages_core-3.11.2 app/views/admin/users/_list.html.erb
pages_core-3.11.1 app/views/admin/users/_list.html.erb
pages_core-3.11.0 app/views/admin/users/_list.html.erb
pages_core-3.10.2 app/views/admin/users/_list.html.erb
pages_core-3.10.1 app/views/admin/users/_list.html.erb
pages_core-3.9.2 app/views/admin/users/_list.html.erb
pages_core-3.9.1 app/views/admin/users/_list.html.erb
pages_core-3.9.0 app/views/admin/users/_list.html.erb
pages_core-3.8.3 app/views/admin/users/_list.html.erb