From 39b565128338459ecbb14144302caf8802878b53 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Tue, 14 Jul 2020 09:44:03 +0200 Subject: [PATCH] Revert FontAwesome in reports to CDN --- app/helpers/reports_helper.rb | 13 ++++++------- app/views/reports/footer.pdf.erb | 2 +- app/views/reports/header.pdf.erb | 2 +- app/views/reports/report.pdf.erb | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/helpers/reports_helper.rb b/app/helpers/reports_helper.rb index 30011507f..b442f1b56 100644 --- a/app/helpers/reports_helper.rb +++ b/app/helpers/reports_helper.rb @@ -115,13 +115,12 @@ module ReportsHelper media: 'all') end - def font_awesome_report_pack_tag - if running_in_development? - wds = Webpacker.dev_server - stylesheet_pack_tag('fontawesome', media: 'all', host: "#{wds.host}:#{wds.port}") - else - wicked_pdf_stylesheet_pack_tag 'fontawesome' - 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 assigned_repository_or_snapshot(my_module, element_id, snapshot, repository) diff --git a/app/views/reports/footer.pdf.erb b/app/views/reports/footer.pdf.erb index 530f5df86..46e88af38 100644 --- a/app/views/reports/footer.pdf.erb +++ b/app/views/reports/footer.pdf.erb @@ -5,7 +5,7 @@ <%= wicked_pdf_stylesheet_link_tag "application" %> <%= wicked_pdf_stylesheet_link_tag "reports_pdf" %> <%= bootstrap_cdn_link_tag %> - <%= font_awesome_report_pack_tag %> + <%= font_awesome_cdn_link_tag %>