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 {
|
.report-common-table-format {
|
||||||
|
page-break-inside: avoid;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
tr {
|
tr {
|
||||||
|
@ -296,6 +297,7 @@ label {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,20 +42,24 @@ div.print-report {
|
||||||
.report-project-header-element {
|
.report-project-header-element {
|
||||||
& > .report-element-body .project-name {
|
& > .report-element-body .project-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-body .project-name {
|
&:hover > .report-element-body .project-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-module-element:hover {
|
.report-module-element:hover {
|
||||||
& > .report-element-body .module-name {
|
& > .report-element-body .module-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-body .module-name {
|
&:hover > .report-element-body .module-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,10 +76,12 @@ div.print-report {
|
||||||
.report-step-element {
|
.report-step-element {
|
||||||
& > .report-element-body .step-name {
|
& > .report-element-body .step-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-body .step-name {
|
&:hover > .report-element-body .step-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,30 +98,42 @@ div.print-report {
|
||||||
.report-step-table-element {
|
.report-step-table-element {
|
||||||
& > .report-element-header .table-name {
|
& > .report-element-header .table-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header .table-name {
|
&:hover > .report-element-header .table-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-step-asset-element {
|
.report-step-asset-element {
|
||||||
& > .report-element-header .file-name {
|
& > .report-element-header .file-name {
|
||||||
color: $color-black;
|
em {
|
||||||
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header .file-name {
|
&:hover > .report-element-header .file-name {
|
||||||
color: $color-black;
|
em {
|
||||||
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.report-step-checklist-element {
|
.report-step-checklist-element {
|
||||||
|
page-break-inside: avoid;
|
||||||
|
|
||||||
& > .report-element-header .checklist-name {
|
& > .report-element-header .checklist-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header .checklist-name {
|
&:hover > .report-element-header .checklist-name {
|
||||||
color: $color-black;
|
color: $color-black;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,12 +141,14 @@ div.print-report {
|
||||||
& > .report-element-header {
|
& > .report-element-header {
|
||||||
.comments-icon,.comments-name {
|
.comments-icon,.comments-name {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header {
|
&:hover > .report-element-header {
|
||||||
.comments-icon,.comments-name {
|
.comments-icon,.comments-name {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,12 +171,14 @@ div.print-report {
|
||||||
& > .report-element-header {
|
& > .report-element-header {
|
||||||
.activity-icon,.activity-name {
|
.activity-icon,.activity-name {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header {
|
&:hover > .report-element-header {
|
||||||
.activity-icon,.activity-name {
|
.activity-icon,.activity-name {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -165,12 +187,34 @@ div.print-report {
|
||||||
& > .report-element-header {
|
& > .report-element-header {
|
||||||
.repository-icon,.repository-name {
|
.repository-icon,.repository-name {
|
||||||
color: $color-black !important;
|
color: $color-black !important;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover > .report-element-header {
|
&:hover > .report-element-header {
|
||||||
.repository-icon,.repository-name {
|
.repository-icon,.repository-name {
|
||||||
color: $color-black !important;
|
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')
|
media: 'all')
|
||||||
end
|
end
|
||||||
|
|
||||||
def font_awesome_cdn_link_tag
|
def font_awesome_report_pack_tag
|
||||||
stylesheet_link_tag(
|
if running_in_development?
|
||||||
'https://maxcdn.bootstrapcdn.com/font-awesome' \
|
wds = Webpacker.dev_server
|
||||||
'/4.6.3/css/font-awesome.min.css'
|
stylesheet_pack_tag('fontawesome', media: 'all', host: "#{wds.host}:#{wds.port}")
|
||||||
)
|
else
|
||||||
|
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)
|
||||||
|
|
|
@ -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_cdn_link_tag %>
|
<%= font_awesome_report_pack_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">
|
||||||
|
|
|
@ -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_cdn_link_tag %>
|
<%= font_awesome_report_pack_tag %>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function number_pages() {
|
function number_pages() {
|
||||||
|
|
|
@ -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_cdn_link_tag %>
|
<%= font_awesome_report_pack_tag %>
|
||||||
</head>
|
</head>
|
||||||
<body class="print-report-body">
|
<body class="print-report-body">
|
||||||
<div class="print-report">
|
<div class="print-report">
|
||||||
|
|
Loading…
Reference in a new issue