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') media: 'all')
end end
def font_awesome_report_pack_tag def font_awesome_cdn_link_tag
if running_in_development? stylesheet_link_tag(
wds = Webpacker.dev_server 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/fontawesome.min.css',
stylesheet_pack_tag('fontawesome', media: 'all', host: "#{wds.host}:#{wds.port}") 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/regular.min.css',
else 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/solid.min.css'
wicked_pdf_stylesheet_pack_tag 'fontawesome' )
end
end end
def assigned_repository_or_snapshot(my_module, element_id, snapshot, repository) 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 "application" %>
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %> <%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
<%= bootstrap_cdn_link_tag %> <%= bootstrap_cdn_link_tag %>
<%= font_awesome_report_pack_tag %> <%= font_awesome_cdn_link_tag %>
</head> </head>
<body class="print-footer-body" style="height: 50px"> <body class="print-footer-body" style="height: 50px">
<div class="print-footer"> <div class="print-footer">

View file

@ -5,7 +5,7 @@
<%= wicked_pdf_stylesheet_link_tag "application" %> <%= wicked_pdf_stylesheet_link_tag "application" %>
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %> <%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
<%= bootstrap_cdn_link_tag %> <%= bootstrap_cdn_link_tag %>
<%= font_awesome_report_pack_tag %> <%= font_awesome_cdn_link_tag %>
<script> <script>
function number_pages() { function number_pages() {

View file

@ -5,7 +5,7 @@
<%= wicked_pdf_stylesheet_link_tag "application" %> <%= wicked_pdf_stylesheet_link_tag "application" %>
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %> <%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
<%= bootstrap_cdn_link_tag %> <%= bootstrap_cdn_link_tag %>
<%= font_awesome_report_pack_tag %> <%= font_awesome_cdn_link_tag %>
</head> </head>
<body class="print-report-body"> <body class="print-report-body">
<div class="print-report"> <div class="print-report">