mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +08:00
Merge pull request #2730 from aignatov-bio/ai-sci-4874-improve-pdf-reports
Improve pdf reports [SCI-4874]
This commit is contained in:
commit
8dd478ad61
6 changed files with 58 additions and 10 deletions
|
@ -68,6 +68,7 @@ label {
|
|||
}
|
||||
|
||||
.report-common-table-format {
|
||||
page-break-inside: avoid;
|
||||
width: 100%;
|
||||
|
||||
tr {
|
||||
|
@ -296,6 +297,7 @@ label {
|
|||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
color: $color-white;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,20 +42,24 @@ div.print-report {
|
|||
.report-project-header-element {
|
||||
& > .report-element-body .project-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover > .report-element-body .project-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.report-module-element:hover {
|
||||
& > .report-element-body .module-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover > .report-element-body .module-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,10 +76,12 @@ div.print-report {
|
|||
.report-step-element {
|
||||
& > .report-element-body .step-name {
|
||||
color: $color-black;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&:hover > .report-element-body .step-name {
|
||||
color: $color-black;
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,30 +98,42 @@ div.print-report {
|
|||
.report-step-table-element {
|
||||
& > .report-element-header .table-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover > .report-element-header .table-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.report-step-asset-element {
|
||||
& > .report-element-header .file-name {
|
||||
color: $color-black;
|
||||
em {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header .file-name {
|
||||
color: $color-black;
|
||||
em {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.report-step-checklist-element {
|
||||
page-break-inside: avoid;
|
||||
|
||||
& > .report-element-header .checklist-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
&:hover > .report-element-header .checklist-name {
|
||||
color: $color-black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,12 +141,14 @@ div.print-report {
|
|||
& > .report-element-header {
|
||||
.comments-icon,.comments-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header {
|
||||
.comments-icon,.comments-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -151,12 +171,14 @@ div.print-report {
|
|||
& > .report-element-header {
|
||||
.activity-icon,.activity-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header {
|
||||
.activity-icon,.activity-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -165,12 +187,34 @@ div.print-report {
|
|||
& > .report-element-header {
|
||||
.repository-icon,.repository-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header {
|
||||
.repository-icon,.repository-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.report-result-element {
|
||||
& > .report-element-header {
|
||||
.result-icon,
|
||||
.result-name,
|
||||
.file-name{
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover > .report-element-header {
|
||||
.result-icon,
|
||||
.result-name,
|
||||
.file-name {
|
||||
color: $color-black !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,11 +115,13 @@ module ReportsHelper
|
|||
media: 'all')
|
||||
end
|
||||
|
||||
def font_awesome_cdn_link_tag
|
||||
stylesheet_link_tag(
|
||||
'https://maxcdn.bootstrapcdn.com/font-awesome' \
|
||||
'/4.6.3/css/font-awesome.min.css'
|
||||
)
|
||||
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
|
||||
end
|
||||
|
||||
def assigned_repository_or_snapshot(my_module, element_id, snapshot, repository)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
</head>
|
||||
<body class="print-footer-body" style="height: 50px">
|
||||
<div class="print-footer">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
|
||||
<script>
|
||||
function number_pages() {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<%= wicked_pdf_stylesheet_link_tag "application" %>
|
||||
<%= wicked_pdf_stylesheet_link_tag "reports_pdf" %>
|
||||
<%= bootstrap_cdn_link_tag %>
|
||||
<%= font_awesome_cdn_link_tag %>
|
||||
<%= font_awesome_report_pack_tag %>
|
||||
</head>
|
||||
<body class="print-report-body">
|
||||
<div class="print-report">
|
||||
|
|
Loading…
Reference in a new issue