unepwcmc/SAPI

View on GitHub
app/views/admin/nomenclature_changes/split/outputs.html.erb

Summary

Maintainability
Test Coverage
<h2>New split: outputs</h2>
<%= split_blurb %>

<h3>Select taxa to split into:</h3>

<%= nomenclature_change_form do |f| %>
  <ol>
  <%= f.fields_for :outputs do |ff| %>

    <li>
    <%= outputs_selection ff %>
    <div class="control-group existing-taxon-input">
      <label class="control-label">Existing taxon concept:</label>
      <div class="controls">
        <%= ff.text_field :taxon_concept_id, {
          :class => 'taxon-concept input-taxon',
          :'data-name' => ff.object.taxon_concept.try(:full_name),
          :'data-taxonomy-id' => @taxonomy.id,
          :'data-name-status' => ff.object.taxon_concept.try(:name_status),
          :'data-name-status-filter' => ['A', 'S'].to_json
        } %>
      </div>
    </div>
    <%= render 'admin/nomenclature_changes/build/new_rank', ff: ff, f: f %>
    <%= render 'admin/nomenclature_changes/build/new_parent', :ff => ff %>
    <div class="upgrade-info">
      <div class="control-group">
        <label class="control-label">New taxon name:</label>
        <div class="controls">
          <%= ff.text_field :new_scientific_name, {
            :class => 'new-scientific-name'
          } %>
          <label class="new-scientific-name-eg">e.g. 'africana' for Loxodonta africana</label>
        </div>
      </div>
      <div class="control-group">
        <label class="control-label">New taxon author & year:</label>
        <div class="controls">
          <%= ff.text_field :new_author_year, {
            :class => 'new-author-year'
          } %>
        </div>
      </div>
    </div>
    </li>
  <% end %>
  <div class='more-split-outputs'></div>
  <p><%= f.link_to_add 'Add another output', :outputs, data: {target: '.more-split-outputs'} %></p>
  </ol>
<% end %>