Revert FontAwesome in reports to CDN

This commit is contained in:
aignatov-bio 2020-07-14 09:44:03 +02:00
parent 8dd478ad61
commit 39b5651283
4 changed files with 9 additions and 10 deletions

View file

@ -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)

View file

@ -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 %>
</head>
<body class="print-footer-body" style="height: 50px">
<div class="print-footer">

View file

@ -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 %>
<script>
function number_pages() {

View file

@ -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 %>
</head>
<body class="print-report-body">
<div class="print-report">