wedding-planner/app/views/guests/index.html.erb

30 lines
695 B
Plaintext
Raw 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>
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>
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 %>