diff --git a/app/views/layouts/plain.html.erb b/app/views/layouts/plain.html.erb index 88916977..2ce9467b 100644 --- a/app/views/layouts/plain.html.erb +++ b/app/views/layouts/plain.html.erb @@ -13,6 +13,9 @@ <%= stylesheet_pack_tag 'application', media: 'all' %> + + Skip to main content + <% if flash.present? %><%= render 'shared/flash' %><% end %> <%= yield %> diff --git a/app/views/submissions/show.html.erb b/app/views/submissions/show.html.erb index 51879660..be9c1691 100644 --- a/app/views/submissions/show.html.erb +++ b/app/views/submissions/show.html.erb @@ -7,7 +7,7 @@ <% is_combined_enabled = configs.find { |e| e.key == AccountConfig::COMBINE_PDF_RESULT_KEY }&.value == true && !@submission.template_fields&.any? { |f| f['type'] == 'verification' } %> <% with_submitter_timezone = configs.find { |e| e.key == AccountConfig::WITH_SUBMITTER_TIMEZONE_KEY }&.value == true %> <% with_signature_id_reason = configs.find { |e| e.key == AccountConfig::WITH_SIGNATURE_ID_REASON_KEY }&.value != false %> -
+
-
- <% has_full_text = schema.all? do |item| - doc = @submission.schema_documents.find { |a| a.uuid == item['attachment_uuid'] } - n_pages = doc.metadata.dig('pdf', 'number_of_pages').to_i - pages_text = doc.blob.metadata.dig('pdf', 'pages_text') || {} - n_pages > 0 && pages_text.size >= n_pages - end %> - <% if has_full_text %> - -
- - -
+ <% has_full_text = schema.all? do |item| + doc = @submission.schema_documents.find { |a| a.uuid == item['attachment_uuid'] } + n_pages = doc.metadata.dig('pdf', 'number_of_pages').to_i + pages_text = doc.blob.metadata.dig('pdf', 'pages_text') || {} + n_pages > 0 && pages_text.size >= n_pages + end %> + <% if has_full_text %> + +
+ + +
+
- <% end %> + <% else %> +
+ <% end %>
<% fields_index = Templates.build_field_areas_index(@submission.template_fields || @submission.template.fields) %> <% submitters_index = @submission.submitters.index_by(&:uuid) %> <% submitters_order_index = nil %> - <% attachments_index = ActiveStorage::Attachment.where(record: @submission.submitters, name: :attachments).preload(:blob).index_by(&:uuid) %> + <% attachments_index = ActiveStorage::Attachment.where(record: @submission.submitters, name: :attachments).index_by(&:uuid) %> <% page_blob_struct = Struct.new(:url, :metadata, keyword_init: true) %> <% bg_classes = %w[bg-red-100 bg-sky-100 bg-emerald-100 bg-yellow-100 bg-purple-100 bg-pink-100 bg-cyan-100 bg-orange-100 bg-lime-100 bg-indigo-100] %> <% schema.each do |item| %> @@ -170,7 +172,7 @@ <% end %> <% end %>
- <% if has_full_text %> + <% if has_full_text %>
- - <% end %> -
+
+
+ <% else %> +
+ <% end %>