Sha256: 8ebf5845aea4261288e20c25e67c427938f08f05e08d9473742900392cecddb8

Contents?: true

Size: 1.37 KB

Versions: 1

Compression:

Stored size: 1.37 KB

Contents

<h2>Users<%= caseadilla_pagination_details @users %></h2>

<table class="table table-striped table-hover table-condensed">
  <thead>
    <tr>
      <th><%= caseadilla_sort_link 'Email', :email %></th>
      <th><%= caseadilla_sort_link 'Name', :last_name %></th>
      <th>Role</th>
      <th>&nbsp;</th>
    </tr>
  </thead>

  <% @users.each do |user| %> 
    <tr>
      <td><%= caseadilla_table_cell_link user.email, caseadilla_user_path(user) %></td>
      <td><%= caseadilla_table_cell_link user.name, caseadilla_user_path(user) %></td>
      <td><%= caseadilla_table_cell_link user.role_symbols.join(', ').titleize, caseadilla_user_path(user) %></td>
      <td class="delete">
        <% confirm_message = "Are you sure you want to delete #{user.email}?" %>
    
        <% if user.id == current_user.id %>
          <% confirm_message += "\n\nWARNING: This is your user account. You will be signed out if you proceed." %>
        <% end %>
      
        <%= link_to(caseadilla_show_row_icon("trash"), caseadilla_user_path(user), :method => :delete, :data => { :confirm => confirm_message }) %>
      </td>
    </tr>
  <% end %>
</table>

<div class="text-center">
  <%= will_paginate @users %>
</div>

<%= content_for :sidebar do %>
  <li><%= link_to "#{caseadilla_show_icon('plus-sign')}Add a new user".html_safe, new_caseadilla_user_path %></li>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caseadilla-0.0.1 app/views/caseadilla/users/index.html.erb