45 lines
1.4 KiB
Plaintext
45 lines
1.4 KiB
Plaintext
<div class="container mt-5">
|
|
<h1 class="mb-4 text-center">Participants</h1>
|
|
|
|
<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>SSN</th>
|
|
<th>Gender</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><%= 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>
|
|
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="text-center mt-3">
|
|
<%= link_to 'New Participant', new_participant_path, class: 'btn btn-success' %>
|
|
</div>
|
|
</div>
|