2024-01-19 18:25:59 -06:00
|
|
|
<div class="container mt-5">
|
|
|
|
<h1 class="mb-4 text-center">Participants</h1>
|
2024-01-16 23:10:18 -06:00
|
|
|
|
2024-01-19 18:25:59 -06:00
|
|
|
<table class="table table-striped table-hover">
|
|
|
|
<thead class="table-dark">
|
2024-01-16 23:10:18 -06:00
|
|
|
<tr>
|
2024-01-19 18:25:59 -06:00
|
|
|
<th>Name</th>
|
|
|
|
<th>Address</th>
|
|
|
|
<th>Phone</th>
|
|
|
|
<th>Email</th>
|
|
|
|
<th>Program</th>
|
|
|
|
<th>MCI</th>
|
|
|
|
<th>DOB</th>
|
|
|
|
<th>SSN</th>
|
|
|
|
<th>Gender</th>
|
|
|
|
<th colspan="3"></th>
|
2024-01-16 23:10:18 -06:00
|
|
|
</tr>
|
2024-01-19 18:25:59 -06:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @participants.each do |participant| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= participant.name %></td>
|
|
|
|
<td><%= participant.address %></td>
|
|
|
|
<td><%= participant.phone %></td>
|
|
|
|
<td><%= participant.email %></td>
|
2024-01-19 23:38:15 -06:00
|
|
|
<td><%= participant.programs.map(&:name).join(", ") %></td>
|
2024-01-19 18:25:59 -06:00
|
|
|
<td><%= participant.mci %></td>
|
2024-01-19 23:38:15 -06:00
|
|
|
<td><%= participant.dob.strftime('%B, %d, %Y') if participant.dob %></td>
|
2024-01-19 18:25:59 -06:00
|
|
|
<td><%= participant.ssn %></td>
|
|
|
|
<td><%= participant.gender %></td>
|
|
|
|
<td><%= link_to 'Show', participant, class: 'btn btn-sm btn-info' %></td>
|
|
|
|
<td><%= link_to 'Edit', edit_participant_path(participant), class: 'btn btn-sm btn-primary' %></td>
|
|
|
|
<td><%= link_to 'Destroy', participant, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-sm btn-danger' %></td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2024-01-16 23:10:18 -06:00
|
|
|
|
2024-01-19 18:25:59 -06:00
|
|
|
<div class="text-center mt-3">
|
|
|
|
<%= link_to 'New Participant', new_participant_path, class: 'btn btn-success' %>
|
|
|
|
</div>
|
|
|
|
</div>
|