sul-dlss/argo

View on GitHub
app/views/text_extraction/_form.html.erb

Summary

Maintainability
Test Coverage
<div id='text-extraction' data-controller='text-extraction'>
  <p>Start text extraction workflow for this item.</p>
  <div class="mt-2 alert alert-warning">
    <% if @cocina_object.type == 'https://cocina.sul.stanford.edu/models/document' %>
       <p>Auto-generating OCR files will not overwrite any existing OCR files that have been corrected to comply with accessibility standards. <strong>Any uncorrected OCR files will be overwritten.</strong> The originally-deposited PDF documents will not be overwritten.</p>
       <p>Avoid auto-generating OCR files for PDF documents that do not contain any text, as it may have adverse effects.</p>
    <% else %>
       <p>Auto-generating OCR files will not overwrite any existing OCR files that have been corrected to comply with accessibility standards. <strong>Any uncorrected OCR files will be overwritten.</strong> The originally-deposited images will not be overwritten.</p>
       <p>Avoid auto-generating OCR files for images that do not contain any text, as it may have adverse effects.</p>
    <% end %>
  </div>
  <%= form_with url: item_text_extraction_path, class: 'col-md-4' do |f| %>
    <%= render LanguageSelectorComponent.new(form: f) %>
    <%= f.submit 'Start text extraction', class: 'btn btn-primary' %>
  <% end %>
</div>