ingang/app/views/users/index.html.erb

43 lines
1.2 KiB
Plaintext

<p id="notice"><%= notice %></p>
<h1>Users</h1>
<table>
<thead>
<tr>
<th>Name</th>
<th>Email</th>
<th>Token</th>
<th>Moderator</th>
<th>Invited</th>
<th>Vote</th>
<th>Proxy</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @users.each do |user| %>
<tr>
<td><%= user.name %></td>
<td><%= user.email %></td>
<td><%= user.token %></td>
<td><%= user.moderator %></td>
<td><%= user.invited %></td>
<td><%= user.vote %></td>
<td><%= user.proxy %></td>
<td><%= link_to 'Show', user_path(user) %></td>
<td><%= link_to 'Edit', edit_user_path(user) %></td>
<td><%= link_to 'Destroy', user_path(user), method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New User', new_room_user_path %> |
<%= link_to 'Send Invitations', invite_room_users_path, method: :post, data: { confirm: 'Are you sure?' } %> |
<%= link_to 'Reset Invitations', invite_room_users_path, method: :delete, data: { confirm: 'Are you sure?' } %> |
<%= link_to 'Back', room_path(params[:room_id]) %>