56 lines
1.6 KiB
Plaintext
56 lines
1.6 KiB
Plaintext
<div class="container mt-5">
|
|
<h1 class="mb-4 text-center">Participants</h1>
|
|
|
|
<div class="text-center mt-3">
|
|
<%= link_to 'New Participant', new_participant_path, class: 'btn btn-secondary mb-3' %>
|
|
</div>
|
|
|
|
<%= paginate @participants %>
|
|
|
|
|
|
<table class="table table-striped table-hover">
|
|
<thead class="table-dark">
|
|
<tr>
|
|
<th>First Name</th>
|
|
<th>Last Name</th>
|
|
<th>Address</th>
|
|
<th>Phone</th>
|
|
<th>Email</th>
|
|
<th>Program</th>
|
|
<th>MCI</th>
|
|
<th>DOB</th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @participants.each do |participant| %>
|
|
<tr>
|
|
<td><%= participant.first_name %></td>
|
|
<td><%= participant.last_name %></td>
|
|
<td><%= participant.address %></td>
|
|
<td><%= participant.phone %></td>
|
|
<td><%= participant.email %></td>
|
|
<td><%= participant.programs.map(&:name).join(", ") %></td>
|
|
<td><%= participant.mci %></td>
|
|
<td><%= participant.dob.strftime('%B %d, %Y') if participant.dob %></td>
|
|
|
|
<td>
|
|
<%= link_to participant, class: 'btn btn-sm btn-secondary' do %>
|
|
<i class="bi bi-eye"></i><!-- Eyeball icon for 'Show' -->
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= link_to edit_participant_path(participant), class: 'btn btn-sm btn-warning' do %>
|
|
<i class="bi bi-pencil-fill"></i> <!-- Pencil icon for 'Edit' -->
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</div>
|
|
|
|
|