Added pdf preview

This commit is contained in:
David Böhm
2024-08-09 12:35:58 +02:00
parent 33db74df71
commit cd07247e5f
4 changed files with 21 additions and 2 deletions

View File

@@ -3,6 +3,11 @@
<span class="p-1.5 text-xs font-medium uppercase tracking-wider bg-opacity-50 text-status-<%= job.status %> bg-status-<%= job.status %>-light rounded-lg"><%= job.id %></span>
</td>
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap"> <%= job.fullname %> </td>
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
<% if job.pdf.attached? %>
<%= image_tag job.pdf.preview(resize_to_limit: [100, 100]) %>
<% end %>
</td>
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
<% if job.pdf.attached? %>
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>