Added viewable? to pdf in views

This commit is contained in:
2024-08-27 16:24:33 +02:00
parent a51ceeade5
commit 18c343f9fb
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@
<% end %>
</td>
<td class="p-2 py-3 text-center">
<% if job.pdf.attached? %>
<% if job.pdf.attached? && job.pdf.previewable? %>
<%= link_to_if job.printing?, image_tag(url_for(job.pdf.preview(resize_to_limit: [100, 100])), class:"shadow-lg"), job.pdf, target: "_blank" %>
<!--<iframe src=<%= url_for(job.pdf) %> width="500" height="700" style="border: none;"></iframe>-->
<% end %>