35 lines
903 B
Plaintext
35 lines
903 B
Plaintext
<h1>Listing users</h1>
|
|
|
|
<%= link_to 'New User', new_user_path %>
|
|
<%= link_to 'Upload all users', upload_all_path %>
|
|
<table>
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Card DB ID</th>
|
|
<th>Card #</th>
|
|
<th>Access?</th>
|
|
<th>Admin?</th>
|
|
<th></th>
|
|
<th></th>
|
|
<th></th>
|
|
</tr>
|
|
|
|
<% if !@users.blank? %>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<td><%= user.name %></td>
|
|
<td><%= user.card_id %></td>
|
|
<td><%= user.card_number %></td>
|
|
<td><%= if user.card_permissions == 1 then "Access" end %></td>
|
|
<td><%= if user.admin? then "Admin" end %></td>
|
|
<td><%= link_to 'Upload', upload_path(user) %></td>
|
|
<td><%= link_to 'Edit', edit_user_path(user) %></td>
|
|
<td><%= link_to 'Destroy', user, :confirm => 'Are you sure? WARNING: THIS DOES NOT REMOVE THE USER FROM THE DOOR SYSTEM! DISABLE THEM FIRST.', :method => :delete %></td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</table>
|
|
|
|
<br />
|
|
|