sul-dlss/argo

View on GitHub
app/views/registrations/create_status.html.erb

Summary

Maintainability
Test Coverage
<h1>DOR item(s) submitted</h1>

<p>Items successfully registered.</p>
<div class="row">
  <div class="col-sm-4">
    <table class="table">
      <thead>
        <tr>
          <th>DRUID</th>
          <th>Barcode</th>
          <th><%= CatalogRecordId.label %></th>
          <th>Source ID</th>
          <th>Label</th>
        </tr>
      </thead>
      <tbody>
      <% @registration_form.created.each do |dro| %>
        <tr>
          <td><%= link_to Druid.new(dro).without_namespace, solr_document_path(dro.externalIdentifier) %></td>
          <td><%= dro.identification.barcode %></td>
          <td><%= dro.identification.catalogLinks.first&.catalogRecordId %></td>
          <td><%= dro.identification.sourceId %></td>
          <td><%= dro.label %></td>
        </tr>
      <% end %>
      </tbody>
    </table>
  </div>
</div>

<% druids = @registration_form.created.map(&:externalIdentifier).map { |druid| "druid[]=#{druid}" }.join('&') %>
<%= link_to "/registration/tracksheet?name=#{@registration_form.project}&sequence=1&#{druids}", class: 'btn btn-outline-primary my-5' do %>
  Tracking sheets
<% end %>

<%= link_to registration_path(registration: params[:registration].to_unsafe_h.except(:items_attributes)), class: 'btn btn-link my-5' do %>
  Back to form
<% end %>