Importer: <%= @importer.name %>

<%= link_to 'Download Original File', importer_original_file_path(@importer.id), class: 'btn btn-primary', data: { turbolinks: false } if @importer.original_file %> <% if @importer.failed_entries? %> <%= link_to 'Export Errored Entries', importer_export_errors_path(@importer.id), class: 'btn btn-primary', data: { turbolinks: false }%> <%= link_to 'Upload Corrected Entries', importer_upload_corrected_entries_path(@importer.id), class: 'btn btn-primary' if @importer.parser.is_a?(Bulkrax::CsvParser) %> <% end %>

<%= t('bulkrax.importer.labels.name') %>: <%= @importer.name %>

<% if defined?(::Hyrax) %>

<%= t('bulkrax.importer.labels.admin_set') %>: <%= @importer.admin_set_id %>

<% end %>

<%= t('bulkrax.importer.labels.user') %>: <%= @importer.user %>

<%= t('bulkrax.importer.labels.frequency') %>: <%= @importer.frequency %>

<%= t('bulkrax.importer.labels.parser_klass') %>: <%= @importer.parser_klass %>

<%= t('bulkrax.importer.labels.limit') %>: <%= @importer.limit %>

<%= render partial: 'bulkrax/shared/bulkrax_errors', locals: {item: @importer} %>
<% @importer.parser_fields.each do |key,value| %> <%= key %>: <%= value %>
<% end %>
<%= render partial: 'bulkrax/shared/bulkrax_field_mapping', locals: {item: @importer} %>

<%= t('bulkrax.importer.labels.total_work_entries') %>: <%= @importer.last_run&.total_work_entries %>

<%= t('bulkrax.importer.labels.total_collections') %>: <%= @importer.last_run&.total_collection_entries %>

<%= t('bulkrax.importer.labels.total_file_sets') %>: <%= @importer.last_run&.total_file_set_entries %>

<%= render partial: 'bulkrax/shared/entries_tab', locals: { item: @importer} %>
<%= render partial: 'bulkrax/importers/edit_item_buttons', locals: { item: @importer, e: @first_entry } if @first_entry.present? %>

<%= link_to 'Edit', edit_importer_path(@importer) %> | <%= link_to 'Back', importers_path %>

<% if @importer.validate_only == true %>
<%= button_to 'Continue', importer_continue_path(@importer), method: :put, class: 'btn btn-primary' %>
<%= button_to 'Discard', @importer, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-primary' %>
<% end %>