From 269e2beeaa3f6d7f853fc3bebdc0b17a8acf4b6f Mon Sep 17 00:00:00 2001 From: Pete Matsyburka Date: Fri, 7 Nov 2025 10:20:41 +0200 Subject: [PATCH] fix preview --- app/views/submissions/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/submissions/show.html.erb b/app/views/submissions/show.html.erb index 6f22607c..bb1d709f 100644 --- a/app/views/submissions/show.html.erb +++ b/app/views/submissions/show.html.erb @@ -81,7 +81,7 @@ <% document = @submission.schema_documents.find { |a| item['attachment_uuid'] == a.uuid } %> <% if document.preview_images.first %> - +
<%= item['name'].presence || document.filename.base %>
@@ -103,7 +103,7 @@ <% (document.metadata.dig('pdf', 'number_of_pages') || (document.preview_images.loaded? ? preview_images_index.size : document.preview_images.size)).times do |index| %> <% page = preview_images_index[index] || page_blob_struct.new(metadata: lazyload_metadata, url: preview_document_page_path(document.signed_uuid, "#{index}.jpg")) %> " class="block before:border before:absolute before:top-0 before:bottom-0 before:left-0 before:right-0 before:rounded relative mb-4" style="container-type: size; aspect-ratio: <%= width = page.metadata['width'] %> / <%= height = page.metadata['height'] %>"> - +
<% document_annots_index[index]&.each do |annot| %> <%= render 'submissions/annotation', annot: %>