Skip to content

Commit

Permalink
Add children info to families show page
Browse files Browse the repository at this point in the history
  • Loading branch information
sarslanoglu authored and benreyn committed Oct 28, 2019
1 parent 9d73644 commit caddb18
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions app/views/families/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<div class="row">
<div class="col-12">
<div class="card mb-12">
<div class="card mb-4">
<h5 class="card-header bg-primary text-white">Family Information
<%= link_to 'Add An Authorized Member To This Family', new_authorized_family_member_path(family_id: @family.id), class: "btn btn-sm btn-warning pull-right", style: "margin-left:10px;" %>
<%= link_to 'Add Child To This Family', new_child_path(family_id: @family.id), class: "btn btn-sm btn-warning pull-right" %>
Expand Down Expand Up @@ -82,7 +82,7 @@

<div class="row">
<div class="col-12">
<div class="card mb-12">
<div class="card mb-4">
<h5 class="card-header bg-primary text-white">Authorized Members for Pick Up</h5>
<table class="table table-striped">
<thead>
Expand All @@ -104,6 +104,27 @@
</tbody>
</table>
</div>

<div class="card mb-4">
<h5 class="card-header bg-primary text-white">Children Information</h5>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Name</th>
<th scope="col">Date of birth</th>
<th scope="col">Gender</th>
</tr>
</thead>
<tbody>
<% @family.children.each do |child| %>
<tr>
<td><%= child.display_name %></td>
<td><%= child.date_of_birth %></td>
<td><%= child.gender %></td>
<% end %>
</tbody>
</table>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit caddb18

Please sign in to comment.