<% @breadcrumbs = [@project, @import, 'Edit'] %> <%- add_javascript('jquery.dataTables.min.js') -%> <%- add_stylesheet('dataTables.css') -%> <%= error_messages_for @import %> <%- if @import.has_duplicate_keys -%>

Duplicate Keys

There were some records in your dataset with duplicate keys. If any rows are legitimate duplicates, you can check the box to have the row removed. Otherwise, new keys will be automatically generated.

<%- @import.dataset do |ds| -%> <%- primary_key = @import.primary_key_sym -%> <%- ds = ds.filter(~{:dup_key_count => nil}).order(primary_key, :dup_key_count) -%>
<%- @import.field_names.each_with_index do |name, i| -%> ><%= name %> <%- end -%> <%- count = ds.count -%> <%- ds.each_with_index do |row, i| -%> <%- klasses = []; klasses << 'alt' if i % 2 == 1; klasses << "bottom" if i == count - 1 -%> > <%- @import.field_names.each do |name| -%> <%- end -%> <%- end -%>
Current Values Remove
Row
<%= row[name.to_sym] %>
<%- end -%>
<%- end -%>