app/views/bulkrax/importers/show.html.erb in bulkrax-4.2.1 vs app/views/bulkrax/importers/show.html.erb in bulkrax-4.3.0

- old
+ new

@@ -78,123 +78,12 @@ <li role="presentation"><a href="#collection-entries" aria-controls="collection-entries" role="tab" data-toggle="tab">Collection Entries</a></li> <li role="presentation"><a href="#file-set-entries" aria-controls="file-set-entries" role="tab" data-toggle="tab">File Set Entries</a></li> </ul> <!-- Tab panes --> <div class="tab-content outline"> - <div role="tabpanel" class="tab-pane active bulkrax-nav-tab-table-left-align" id="work-entries"> - <table class='table table-striped'> - <thead> - <tr> - <th>Identifier</th> - <th>Entry ID</th> - <th>Status</th> - <th>Errors</th> - <th>Status Set At</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - <% @work_entries.each do |e| %> - <tr> - <td><%= link_to e.identifier, bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <td><%= e.id %></td> - <% if e.status == "Complete" %> - <td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td> - <% elsif e.status == "Pending" %> - <td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td> - <% else %> - <td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td> - <% end %> - <% if e.last_error.present? %> - <td><%= link_to e.last_error.dig("error_class"), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <% else %> - <td></td> - <% end %> - <td><%= e.status_at %></td> - <td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - </tr> - <% end %> - </tbody> - </table> - <%= page_entries_info(@work_entries) %><br /> - <%= paginate(@work_entries, theme: 'blacklight', param_name: :work_entries_page, params: { anchor: 'work-entries'}) %> - </div> - <div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="collection-entries"> - <table class='table table-striped'> - <thead> - <tr> - <th>Identifier</th> - <th>Entry ID</th> - <th>Status</th> - <th>Errors</th> - <th>Status Set At</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - <% @collection_entries.each do |e| %> - <tr> - <td><%= link_to e.identifier, bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <td><%= e.id %></td> - <% if e.status == "Complete" %> - <td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td> - <% elsif e.status == "Pending" %> - <td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td> - <% else %> - <td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td> - <% end %> - <% if e.last_error.present? %> - <td><%= link_to e.last_error.dig("error_class"), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <% else %> - <td></td> - <% end %> - <td><%= e.status_at %></td> - <td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - </tr> - <% end %> - </tbody> - </table> - <%= page_entries_info(@collection_entries) %><br /> - <%= paginate(@collection_entries, theme: 'blacklight', param_name: :collections_entries_page, params: {anchor: 'collection-entries'}) %> - </div> - <div role="tabpanel" class="tab-pane bulkrax-nav-tab-table-left-align" id="file-set-entries"> - <table class='table table-striped'> - <thead> - <tr> - <th>Identifier</th> - <th>Entry ID</th> - <th>Status</th> - <th>Errors</th> - <th>Status Set At</th> - <th>Actions</th> - </tr> - </thead> - <tbody> - <% @file_set_entries.each do |e| %> - <tr> - <td><%= link_to e.identifier, bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <td><%= e.id %></td> - <% if e.status == "Complete" %> - <td><span class="glyphicon glyphicon-ok" style="color: green;"></span> <%= e.status %></td> - <% elsif e.status == "Pending" %> - <td><span class="glyphicon glyphicon-option-horizontal" style="color: blue;"></span> <%= e.status %></td> - <% else %> - <td><span class="glyphicon glyphicon-remove" style="color: <%= e.status == 'Deleted' ? 'green' : 'red' %>;"></span> <%= e.status %></td> - <% end %> - <% if e.last_error.present? %> - <td><%= link_to e.last_error.dig("error_class"), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - <% else %> - <td></td> - <% end %> - <td><%= e.status_at %></td> - <td><%= link_to raw('<span class="glyphicon glyphicon-info-sign"></span>'), bulkrax.importer_entry_path(@importer.id, e.id) %></td> - </tr> - <% end %> - </tbody> - </table> - <%= page_entries_info(@file_set_entries) %><br /> - <%= paginate(@file_set_entries, theme: 'blacklight', param_name: :file_set_entries_page, params: {anchor: 'file-set-entries'}) %> - </div> + <%= render partial: 'bulkrax/shared/work_entries_tab', locals: { item: @importer, entries: @work_entries } %> + <%= render partial: 'bulkrax/shared/collection_entries_tab', locals: { item: @importer, entries: @collection_entries } %> + <%= render partial: 'bulkrax/shared/file_set_entries_tab', locals: { item: @importer, entries: @file_set_entries } %> </div> </div> <p class="bulkrax-p-align"> <%= link_to 'Edit', edit_importer_path(@importer) %>