diff --git a/Gemfile b/Gemfile index 482698b51..6c98af75b 100644 --- a/Gemfile +++ b/Gemfile @@ -84,7 +84,7 @@ gem 'silencer' # Silence certain Rails logs gem 'sneaky-save', git: 'https://github.com/einzige/sneaky-save' gem 'turbolinks', '~> 5.1.1' gem 'underscore-rails' -gem 'wicked_pdf', '~> 1.4.0' +gem 'wicked_pdf' gem 'wkhtmltopdf-heroku', '2.12.5' gem 'aws-sdk-rails' diff --git a/Gemfile.lock b/Gemfile.lock index a2dff6f56..8d14ab802 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -210,7 +210,7 @@ GEM coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.1.9) crack (0.4.5) rexml crass (1.0.6) @@ -300,7 +300,7 @@ GEM httparty (0.17.3) mime-types (~> 3.0) multi_xml (>= 0.5.2) - i18n (1.8.7) + i18n (1.8.10) concurrent-ruby (~> 1.0) i18n-js (3.8.0) i18n (>= 0.6.6) @@ -366,7 +366,7 @@ GEM mini_magick (4.11.0) mini_mime (1.0.2) mini_portile2 (2.5.1) - minitest (5.14.3) + minitest (5.14.4) momentjs-rails (2.17.1) railties (>= 3.1) msgpack (1.4.2) @@ -614,7 +614,7 @@ GEM websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) whacamole (1.2.0) - wicked_pdf (1.4.0) + wicked_pdf (2.1.0) activesupport wkhtmltopdf-heroku (2.12.5.0) xpath (3.2.0) @@ -732,7 +732,7 @@ DEPENDENCIES webmock webpacker (~> 4.0.0) whacamole - wicked_pdf (~> 1.4.0) + wicked_pdf wkhtmltopdf-heroku (= 2.12.5) yomu! diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index feb0147e7..585448942 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -53,6 +53,14 @@ module ReportsHelper "[#{text}]".html_safe end + def font_awesome_cdn_link_tag + stylesheet_link_tag( + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/fontawesome.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/regular.min.css', + 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/solid.min.css' + ) + end + def filter_steps_for_report(steps, settings) include_completed_steps = settings.dig('task', 'protocol', 'completed_steps') include_uncompleted_steps = settings.dig('task', 'protocol', 'uncompleted_steps') diff --git a/app/views/reports/report.pdf.erb b/app/views/reports/report.pdf.erb index 11c1d8adc..a0c434e28 100644 --- a/app/views/reports/report.pdf.erb +++ b/app/views/reports/report.pdf.erb @@ -4,9 +4,7 @@ <%= wicked_pdf_stylesheet_link_tag "application" %> <%= wicked_pdf_stylesheet_link_tag "reports_pdf" %> - <%= wicked_pdf_stylesheet_pack_tag "fonts" %> - <%= wicked_pdf_stylesheet_pack_tag "fontawesome" %> - <%= wicked_pdf_stylesheet_link_tag "bootstrap" %> + <%= font_awesome_cdn_link_tag %> <%= wicked_pdf_javascript_include_tag "jquery" %> <%= wicked_pdf_javascript_include_tag "handsontable.full" %>