SpeciesFileGroup/taxonworks

View on GitHub
app/views/tasks/accessions/breakdown/_breakdown_nav_items.html.erb

Summary

Maintainability
Test Coverage
<div class="flex-separate">
  <ul class="context-menu actions">
    <li> Sqed depiction:  <%= link_to(@result.sqed_depiction.to_param, depiction_path(@result.sqed_depiction.depiction)) -%></li>

    <li><%= link_to('Next without data', sqed_depiction_breakdown_task_path(@result.sqed_depiction.next_without_data, @result.namespace_id), 'data-turbolinks' => 'false') -%>  </li>
    <%= sqed_previous_next_links(@result.sqed_depiction) -%> 
    <li> <%= link_to('TODO map', sqed_depiction_breakdown_todo_map_task_path) -%> </li>

    <li>
      <% if @result.depiction.image -%>
        <%= link_to('Original image', @result.depiction.image.image_file.url(:original), target: '_blank') -%>
      <% else %>
        INVALID DEPICTION- MISSING IMAGE.
      <% end %>
    </li>

    <% if @sqed_depiction -%>
      <li class="actions">
        <%= button_to "Recalculate", { action: :update, controller: '/sqed_depictions', id: @sqed_depiction.id }, method: :patch,
          data: { confirm: "Recalculate borders and OCR for buffered fields?  Existing changes will not be saved." } %>
      </li>
    <% end %>

    <li><%= link_to(
      'Buffered breakdown', collection_object_buffered_data_breakdown_task_path(@result.depiction.depiction_object),
      'data-turbolinks' => false) -%>
    </li>
  </ul>
</div>