TechLadies/home-web

View on GitHub
app/views/involvements/_person.html.erb

Summary

Maintainability
Test Coverage
<div class='well well-default'>

  <div class='row'>
    <div class='col-md-10'>
      <h3><%= link_to person.name, person_path(person) %></h3>
    </div>
    <div class='col-md-1 pull-right'>
      <%= link_to 'Remove', case_involvement_path(involvement.case_file, involvement), method: :delete, class: 'btn btn-danger btn-xs pull-right', style: 'color: #FFFFFF' , data: { confirm: "Are you sure?" } if @case_file.pending? %>
    </div>
  </div>

  <table class="table table-noline">
    <tbody>

      <tr>
        <th>Date of Birth</th>
        <td><%= person.date_of_birth.to_formatted_s(:rfc822) unless person.date_of_birth == nil %></td>
      </tr>

      <tr>
        <th>Gender</th>
        <td><%= person.gender.titleize %></td>
      </tr>

      <tr>
        <th>Contact</th>
        <td><%= person.phone %></td>
      </tr>

      <tr>
        <th>Email</th>
        <td><%= person.email %></td>
      </tr>

    </tbody>
  </table>

</div>