SpeciesFileGroup/taxonworks

View on GitHub
app/views/otus/batch_load/data_attributes/_batch_load.html.erb

Summary

Maintainability
Test Coverage
<div>
  <h2> Data Attributes batch load </h2>

  <div class="flexbox full_viewport_whitespace">
    <div class="item item1 one_third_width">
      <h3> Description and requirements </h3>

      <p> Creates input attributes or internal attributes for Otus (which can be created if required)
        as represented in the CSV file. </p>
      <ul>
        <li>A tab-delimited, UTF-8 compatible text file is required.</li>
        <li>Column headers are <b>OtuName</b>, <b>Predicate</b>, and <b>Value</b> (Capitalization is not required.)
          (see <%= link_to('sample template',
                           asset_path('batch_load_templates/otus/otus_data_attributes_batch_load.tab',
                                      skip_pipeline: true),
                           target: '_blank') -%>).
        </li>
        <li>Multiple uploads of the same data will not create additional data attributes.</li>
        <li>There is currently no size limit to the file being loaded but this may change in the future.</li>
      </ul>
    </div>

    <div class="item item2 one_third_width">
      <h3> Example file </h3>

      <p> A tab-delimited formatted file, where the "OtuName" column is an Otu name, "Predicate" is the name to be used
        to describe the purpose of the "Value" column in relation to "OtuName". View sample file template.</p>

      <pre class="fixed_width_font">
        <table border="1">
          <thead>
            <tr>
              <th>OtuName</th>
              <th>Predicate</th>
              <th>Value</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td>Aus bus</td>
              <td>TotalSpecies</td>
              <td>22</td>
            </tr>
            <tr>
              <td>Hymenoptera</td>
              <td>TotalSpecies</td>
              <td>19</td>
            </tr>
          </tbody>
        </table>
      </pre>
    </div>

    <div class="item item3">
      <h3> Go! </h3>
      <%= render(partial: '/otus/batch_load/data_attributes/form',
                 locals: {url: preview_data_attributes_batch_load_otus_path,
                          submit: :preview}) -%>
    </div>
  </div>
</div>