Skip to content

Commit

Permalink
Merge pull request #457 from samvera-labs/update-importer-collection-…
Browse files Browse the repository at this point in the history
…title-display

Bulkrax 3+ update to display collection title on importer show page w…
  • Loading branch information
alishaevn authored Apr 8, 2022
2 parents 8d0c632 + 7933272 commit 97b9900
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions app/views/bulkrax/importers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,8 @@
<% @work_entries.each do |e| %>
<tr>
<td><%= link_to e.identifier, bulkrax.importer_entry_path(@importer.id, e.id) %></td>
<% if e.parsed_metadata.present? && e.parsed_metadata.dig("collections").present? %>
<td><%= e.parsed_metadata.dig("collections").map {|c| c['id'] }.join('; ') %></td>
<% elsif e.raw_metadata.present? %>
<td><%= Array.wrap(e.raw_metadata.dig("collection")).join(';') %></td>
<% else %>
<td></td>
<% end %>
<% collection_titles = e.collection_ids.map {|id| c = Collection.find id; c.title.first } %>
<td><%= collection_titles.join('; ') %></td>
<td><%= e.id %></td>
<% if e.status == "Complete" %>
<td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td>
Expand Down

0 comments on commit 97b9900

Please sign in to comment.