38 lines
962 B
Plaintext
Raw Permalink Normal View History

2024-07-11 20:08:26 +02:00
<p style="color: green"><%= notice %></p>
<h1>Guests</h1>
<div id="guests">
2024-07-11 20:13:22 +02:00
<table>
<tr>
2024-07-11 20:14:23 +02:00
<th>Row #</th>
2024-07-11 20:13:22 +02:00
<th>Name</th>
<th>Email</th>
<th>Phone</th>
<th>Affinity groups</th>
<th>Unbreakable bonds</th>
2024-07-11 20:13:22 +02:00
<th colspan="2"></th>
</tr>
2024-07-11 20:14:23 +02:00
<% @guests.each_with_index do |guest, i| %>
2024-07-11 20:13:22 +02:00
<tr>
2024-07-11 20:14:23 +02:00
<td><%= i + 1 %></td>
2024-07-11 20:13:22 +02:00
<td><%= guest.full_name %></td>
<td><%= guest.email %></td>
<td><%= guest.phone %></td>
<td><%= guest.affinity_groups.pluck(:name).join(", ") %></td>
<td><%= guest.unbreakable_bonds.pluck(:name).join(", ") %></td>
2024-07-11 20:13:22 +02:00
<td><%= link_to "Show", guest %></td>
<td><%= link_to "Edit", edit_guest_path(guest) %></td>
</tr>
2024-07-11 20:08:26 +02:00
<% end %>
2024-07-11 20:13:22 +02:00
</table>
2024-07-11 20:08:26 +02:00
</div>
<%= link_to "New guest", new_guest_path %>
2024-07-25 10:47:49 +02:00
<%= form_with url: import_guests_path, method: :post do |form| %>
<%= form.label :file %>
<%= form.file_field :file %>
<%= form.submit "Import" %>
<% end %>