PDF view in letter view
This commit is contained in:
parent
e2e47eff46
commit
ad6200d071
3 changed files with 17 additions and 3 deletions
2
Gemfile
2
Gemfile
|
@ -44,6 +44,8 @@ gem "tzinfo-data", platforms: %i[ mswin mswin64 mingw x64_mingw jruby ]
|
||||||
# Reduces boot times through caching; required in config/boot.rb
|
# Reduces boot times through caching; required in config/boot.rb
|
||||||
gem "bootsnap", require: false
|
gem "bootsnap", require: false
|
||||||
|
|
||||||
|
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
|
||||||
gem "debug", platforms: %i[ mri mswin mswin64 mingw x64_mingw ]
|
gem "debug", platforms: %i[ mri mswin mswin64 mingw x64_mingw ]
|
||||||
|
|
|
@ -104,10 +104,14 @@ GEM
|
||||||
drb (2.2.1)
|
drb (2.2.1)
|
||||||
error_highlight (0.6.0)
|
error_highlight (0.6.0)
|
||||||
erubi (1.12.0)
|
erubi (1.12.0)
|
||||||
|
ffi (1.17.0)
|
||||||
globalid (1.2.1)
|
globalid (1.2.1)
|
||||||
activesupport (>= 6.1)
|
activesupport (>= 6.1)
|
||||||
i18n (1.14.5)
|
i18n (1.14.5)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
image_processing (1.12.2)
|
||||||
|
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)
|
||||||
|
@ -129,6 +133,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.12.0)
|
||||||
mini_mime (1.1.5)
|
mini_mime (1.1.5)
|
||||||
minitest (5.23.1)
|
minitest (5.23.1)
|
||||||
msgpack (1.7.2)
|
msgpack (1.7.2)
|
||||||
|
@ -196,6 +201,8 @@ GEM
|
||||||
io-console (~> 0.5)
|
io-console (~> 0.5)
|
||||||
rexml (3.2.8)
|
rexml (3.2.8)
|
||||||
strscan (>= 3.0.9)
|
strscan (>= 3.0.9)
|
||||||
|
ruby-vips (2.2.1)
|
||||||
|
ffi (~> 1.12)
|
||||||
rubyzip (2.3.2)
|
rubyzip (2.3.2)
|
||||||
selenium-webdriver (4.21.1)
|
selenium-webdriver (4.21.1)
|
||||||
base64 (~> 0.2)
|
base64 (~> 0.2)
|
||||||
|
@ -245,6 +252,7 @@ DEPENDENCIES
|
||||||
cssbundling-rails
|
cssbundling-rails
|
||||||
debug
|
debug
|
||||||
error_highlight (>= 0.4.0)
|
error_highlight (>= 0.4.0)
|
||||||
|
image_processing (>= 1.2)
|
||||||
importmap-rails
|
importmap-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
puma (>= 5.0)
|
puma (>= 5.0)
|
||||||
|
|
|
@ -1,8 +1,12 @@
|
||||||
<h2><%= @letter.title %></h2>
|
<h2><%= @letter.title %></h2>
|
||||||
|
|
||||||
Rédigée par : <%= @letter.author %> <% unless @letter.private_email %>(<%= @letter.email %>) <% end %>
|
Rédigée par : <%= @letter.author %>
|
||||||
|
<% unless @letter.private_email %>
|
||||||
|
(<%= @letter.email %>)
|
||||||
|
<% end %>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<%= @letter.document %>
|
<iframe src="<%= url_for @letter.document %>"
|
||||||
|
type="<%= @letter.document.attachment.blob.content_type %>"
|
||||||
|
style="width:1000px; height:800px;"></iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue