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

56 lines
2.5 KiB
Plaintext

<p id="notice"><%= notice %></p>
<h1>Users: <%= @room.name %></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>Presence</th>
<th colspan="2"></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><%= user.presence %></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 you wish to destroy this user?' } %></td>
<td><%= link_to 'Send test invite', test_invite_user_path(params[:room_id], user), method: :post %></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 you wish to send invitations?' } %> |
<%= link_to 'Reset Invitations', invite_room_users_path, method: :delete, data: { confirm: 'Are you sure you wish to reset all invitations?' } %> |
<%= link_to 'Mark all as invited', mark_invited_room_users_path, method: :post, data: { confirm: 'Are you sure you wish to mark all users as invited?' } %> |
<%= link_to 'Mark all as present', mark_presence_room_users_path(v: 1), method: :post, data: { confirm: 'Are you sure you wish to mark all users as present?' } %> |
<%= link_to 'Mark all as not present', mark_presence_room_users_path(v: 0), method: :post, data: { confirm: 'Are you sure you wish to mark all users as not present?' } %> |
<%= link_to 'Bulk import', bulk_new_room_users_path, method: :get %> |
<%= link_to 'Export Voters', room_export_voters_path(params[:room_id]) %> |
<%= link_to 'Present Users', room_present_users_path(id: params[:room_id], v: 1) %> |
<%= link_to 'Absent Users', room_present_users_path(id: params[:room_id], v: 0) %> |
<%= link_to 'Destroy all', destroy_room_users_path(params[:room_id]), method: :delete %> |
<%= link_to 'Import Votes', bulk_new_room_votes_path(params[:room_id]), method: :get %> |
<%= link_to 'Destroy Votes', room_votes_path(params[:room_id]), method: :delete %> |
<%= link_to 'Back', room_path(params[:room_id]) %>