Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Philip Elson
CARA
Commits
e521817f
Commit
e521817f
authored
Sep 10, 2021
by
Luis Aleixo
Browse files
Create a new QRcode for the PDF version
parent
3782cd05
Changes
2
Show whitespace changes
Inline
Side-by-side
cara/apps/calculator/static/css/report.css
View file @
e521817f
...
...
@@ -56,7 +56,7 @@ p.notes {
margin
:
1%
}
#pdf
-
qr
-
code
{
#pdf
_
qrcode
_aref
{
margin-right
:
1%
;
width
:
100pt
;
}
...
...
@@ -102,11 +102,6 @@ p.notes {
border-radius
:
5px
;
}
.print-button
{
margin-left
:
auto
;
margin-right
:
1%
;
}
/* @media (width: 1200px) { */
@media
print
{
/* #body {
...
...
@@ -120,7 +115,7 @@ p.notes {
#link_reproduce_results
{
display
:
none
!important
;
}
#pdf
-
qr
-
code
{
#pdf
_
qrcode
_aref
{
visibility
:
inherit
!important
;
}
.collapse
{
...
...
@@ -138,9 +133,6 @@ p.notes {
.icon_button
{
display
:
none
!important
;
}
.print-button
{
display
:
none
!important
;
}
.card
{
page-break-inside
:
avoid
;
}
...
...
cara/apps/calculator/templates/base/calculator.report.html.j2
View file @
e521817f
...
...
@@ -23,7 +23,8 @@
<h2
class=
"text-component-title mb-0"
>
CARA - CALCULATOR REPORT
</h1>
<p
class=
"mb-0"
>
Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}
</p>
</div>
<button
type=
"button"
class=
"btn btn-outline-dark align-self-center"
style=
"margin-right: -100pt"
id=
"download-pdf"
onclick=
"print()"
>
Print Report
</button>
<button
type=
"button"
class=
"btn btn-outline-dark align-self-center"
id=
"print-button"
style=
"margin-right: -100pt"
onclick=
"print()"
>
Print Report
</button>
<a
href=
"{{ permalink.link }}"
style=
"float: left;"
id=
"pdf_qrcode_aref"
class=
"align-self-center invisible"
><div
id=
"pdf_qrcode"
></div></a>
</div>
{% endblock report_header %}
...
...
@@ -443,6 +444,11 @@
width
:
330
,
height
:
330
}
);
new
QRCode
(
document
.
getElementById
(
"
pdf_qrcode
"
),
{
text
:
"
{{ permalink.shortened }}
"
,
width
:
133
,
height
:
133
}
);
</script>
</body>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment