AgileVentures/osra

View on GitHub
app/views/pending_orphan_lists/valid_list.html.erb

Summary

Maintainability
Test Coverage
<%=render partial: "layouts/content_title.erb",
          locals: {title: "Validate Spreadsheet for partner: #{partner.name}, OSRA Number: #{partner.osra_num}"} %>

<h1 class="indent">Orphan list is valid</h1>

<p class="indent"> The following are the orphans included in the uploaded file: </p>

<div class='table-responsive'>
  <table class='table table-hover'>
    <thead>
      <tr>
        <th> Name </th>
        <th> Father Name </th>
        <th> Date Of Birth </th>
        <th> Gender </th>
    </thead>
    <tbody>
      <%- result.each do |orphan| %>
        <tr>
          <td>
            <%= orphan.name %>
          </td>
          <td>
            <%= orphan.father_given_name %>
          </td>
          <td>
            <%= orphan.date_of_birth %>
          </td>
          <td>
            <%= orphan.gender %>
          </td>
        </tr>
      <%- end %>
    </tbody>
  </table>
</div>

<%= form_for :orphan_list, url: import_partner_pending_orphan_lists_path(partner),
    html: {class: "records_form", role: "form"} do |f| %>
  <fieldset>
    <%= f.hidden_field :pending_id, value: pending_orphan_list.id %>
    <div class="form-group">
      <%= f.submit "Import", class: "btn btn-primary" %>
      <%= link_to "Cancel", partner_pending_orphan_list_path(partner, pending_orphan_list),
             method: :delete, class: "btn btn-default btn-cancel", role: "button" %>
    </div>
  </fieldset>
<% end %>