unepwcmc/SAPI

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

Summary

Maintainability
Test Coverage
<h2>New split: handle distribution</h2>
<%= split_blurb %>
<p>
  <i class="icon-info-sign"></i>
  Please check distribution assignments for newly split taxa. Distribution can be assigned to multiple split outputs.
</p>
<%= nomenclature_change_form do |f| %>

  <%= global_selection %>

  <%= f.fields_for :input do |ff| %>
    <p>
      <i class="icon-info-sign"></i>
      Local selection
    </p>

    <%= ff.fields_for :distribution_reassignments do |fff| %>
      <div class="control-group">
        <label class="control-label">
          <%= fff.object.reassignable.geo_entity.name %>
        </label>
        <div class="controls">
          <%= fff.select :output_ids,
            options_for_select(
              @nomenclature_change.outputs.map do |o|
                [o.display_full_name, o.id]
              end,
              fff.object.output_ids
            ),
            {}, {:class => 'simple-taxon-concept', :multiple => ''}
          %>
          <input type="checkbox" class="select-all-checkbox" checked>Select All
        </div>
      </div>
    <% end %>

  <% end %>
<% end %>