Added pdf preview
This commit is contained in:
2
Gemfile
2
Gemfile
@@ -45,7 +45,7 @@ gem 'tzinfo-data', platforms: %i[windows jruby]
|
|||||||
gem 'bootsnap', require: false
|
gem 'bootsnap', require: false
|
||||||
|
|
||||||
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
|
||||||
# gem "image_processing", "~> 1.2"
|
gem "image_processing", "~> 1.2"
|
||||||
|
|
||||||
group :development, :test do
|
group :development, :test do
|
||||||
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
|
||||||
|
|||||||
14
Gemfile.lock
14
Gemfile.lock
@@ -105,11 +105,20 @@ GEM
|
|||||||
erubi (1.13.0)
|
erubi (1.13.0)
|
||||||
faker (3.4.2)
|
faker (3.4.2)
|
||||||
i18n (>= 1.8.11, < 2)
|
i18n (>= 1.8.11, < 2)
|
||||||
|
ffi (1.17.0-aarch64-linux-gnu)
|
||||||
|
ffi (1.17.0-arm-linux-gnu)
|
||||||
|
ffi (1.17.0-arm64-darwin)
|
||||||
|
ffi (1.17.0-x86-linux-gnu)
|
||||||
|
ffi (1.17.0-x86_64-darwin)
|
||||||
|
ffi (1.17.0-x86_64-linux-gnu)
|
||||||
globalid (1.2.1)
|
globalid (1.2.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
hashery (2.1.2)
|
hashery (2.1.2)
|
||||||
i18n (1.14.5)
|
i18n (1.14.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
image_processing (1.13.0)
|
||||||
|
mini_magick (>= 4.9.5, < 5)
|
||||||
|
ruby-vips (>= 2.0.17, < 3)
|
||||||
importmap-rails (2.0.1)
|
importmap-rails (2.0.1)
|
||||||
actionpack (>= 6.0.0)
|
actionpack (>= 6.0.0)
|
||||||
activesupport (>= 6.0.0)
|
activesupport (>= 6.0.0)
|
||||||
@@ -135,6 +144,7 @@ GEM
|
|||||||
net-smtp
|
net-smtp
|
||||||
marcel (1.0.4)
|
marcel (1.0.4)
|
||||||
matrix (0.4.2)
|
matrix (0.4.2)
|
||||||
|
mini_magick (4.13.2)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.24.1)
|
minitest (5.24.1)
|
||||||
msgpack (1.7.2)
|
msgpack (1.7.2)
|
||||||
@@ -223,6 +233,9 @@ GEM
|
|||||||
rexml (3.3.4)
|
rexml (3.3.4)
|
||||||
strscan
|
strscan
|
||||||
ruby-rc4 (0.1.5)
|
ruby-rc4 (0.1.5)
|
||||||
|
ruby-vips (2.2.2)
|
||||||
|
ffi (~> 1.12)
|
||||||
|
logger
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
selenium-webdriver (4.23.0)
|
selenium-webdriver (4.23.0)
|
||||||
base64 (~> 0.2)
|
base64 (~> 0.2)
|
||||||
@@ -296,6 +309,7 @@ DEPENDENCIES
|
|||||||
capybara
|
capybara
|
||||||
debug
|
debug
|
||||||
faker (~> 3.4)
|
faker (~> 3.4)
|
||||||
|
image_processing (~> 1.2)
|
||||||
importmap-rails
|
importmap-rails
|
||||||
inline_svg (~> 1.9)
|
inline_svg (~> 1.9)
|
||||||
jbuilder
|
jbuilder
|
||||||
|
|||||||
@@ -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>
|
<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>
|
||||||
<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"> <%= 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">
|
<td class="p-3 text-sm text-hsrm-gray whitespace-nowrap">
|
||||||
<% if job.pdf.attached? %>
|
<% if job.pdf.attached? %>
|
||||||
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>
|
<%#= link_to job.pdf.filename, rails_blob_path(job.pdf, disposition: "attachment") %>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> ID </th>
|
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> ID </th>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Auftraggeber </th>
|
<th class="p-3 text-sm font-semibold tracking-wide text-left"> Auftraggeber </th>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left"> PDF </th>
|
<th colspan="2" class="p-3 text-sm font-semibold tracking-wide text-left"> PDF </th>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A0 </th>
|
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A0 </th>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A1 </th>
|
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A1 </th>
|
||||||
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A2 </th>
|
<th class="p-3 text-sm font-semibold tracking-wide text-left w-1"> A2 </th>
|
||||||
|
|||||||
Reference in New Issue
Block a user