SpeciesFileGroup/taxonworks

View on GitHub
app/views/taxon_names/batch_load/simple/preview.html.erb

Summary

Maintainability
Test Coverage
<% content_for :warn_level do -%>
    <%= warn_level_input(@result) -%>
<% end %>

<%= content_for :batch_form do -%>
  <%= render partial: '/taxon_names/batch_load/simple/form', locals: {url: create_simple_batch_load_taxon_names_path, submit: :create} -%>
<% end %>

<%= content_for :line_breakdown do -%>
  <table class="top_align_text"> 
    <tr>
      <th class="four_character_width">line</th>
      <th class="four_character_width">data count</th>
      <th> name(s) </th>
      <th class=""> data errors* </th>
    </tr>

    <% @result.sorted_processed_rows.each do |i, rp| -%>
      <tr>
        <%= batch_line_link_td(i) -%> 
        <%= batch_all_objects_count_td(rp) -%>
        <td>
          <%= rp.objects[:protonyms].each_with_index.collect{|n, i| "#{i + 1}: " +  n.get_full_name }.join('<br>').html_safe -%>
        </td> 

        <td>
          <%= rp.objects[:protonyms].collect{|n| n.full_error_messages_excepting(:parent, :parent_id)}.join('<br>').html_safe -%>
        </td> 

      </tr>
    <% end -%> 
  </table>
<% end %>


<%= render partial: '/shared/data/all/batch_load/preview' -%>