<%= notice %>

Exporter: <%= @exporter.name %>

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

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

<%= t('bulkrax.exporter.labels.export_type') %>: <%= @exporter.export_type %>

<%= t('bulkrax.exporter.labels.export_from') %>: <%= @exporter.export_from %>

<%= t('bulkrax.exporter.labels.export_source') %>: <% case @exporter.export_from %> <% when 'collection' %> <% collection = Collection.find(@exporter.export_source) %> <%= link_to collection&.title&.first, hyrax.dashboard_collection_path(collection.id) %> <% when 'importer' %> <% importer = Bulkrax::Importer.find(@exporter.export_source) %> <%= link_to importer.name, bulkrax.importer_path(importer.id) %> <% when 'worktype' %> <%= @exporter.export_source %> <% end %>

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

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

<%= render partial: 'bulkrax/shared/bulkrax_field_mapping', locals: {item: @exporter} %> <%# Currently, no parser-specific fields exist on Exporter, thus there's no real reason to always show this field %> <% if @exporter.parser_fields.present? %>

<%= t('bulkrax.exporter.labels.parser_fields') %>:
<% @exporter.parser_fields.each do |k, v| %> <%= k %>: <%= v %>
<% end %>

<% end %>

<%= t('bulkrax.exporter.labels.field_mapping') %>:

<%= t('bulkrax.exporter.labels.total_work_entries') %>: <%= @exporter.exporter_runs.last&.total_work_entries %>


Entries

<% @work_entries.each do |e| %> <% if e.parsed_metadata.present? && e.parsed_metadata.dig('collections').present? %> <% elsif e.raw_metadata.present? %> <% else %> <% end %> <% if e.status == 'Complete' %> <% else %> <% end %> <% if e.last_error.present? %> <% else %> <% end %> <% end %>
Identifier Collection Entry ID Status Errors Status Set At Actions
<%= link_to e.identifier, bulkrax.exporter_entry_path(@exporter.id, e.id) %><%= e.parsed_metadata.dig('collections').map {|c| c['id'] }.join('; ') %><%= Array.wrap(e.raw_metadata.dig('collection')).join(';') %><%= e.id %> <%= e.status %> <%= e.status %><%= link_to e.last_error.dig('error_class'), bulkrax.exporter_entry_path(@exporter.id, e.id) %><%= e.status_at %> <%= link_to raw(""), bulkrax.exporter_entry_path(@exporter.id, e.id) %>
<%= page_entries_info(@work_entries) %>
<%= paginate(@work_entries, param_name: :work_entries_page) %>
<%= link_to 'Edit', edit_exporter_path(@exporter) %> | <%= link_to 'Back', exporters_path %>