Commit e521817f authored by Luis Aleixo's avatar Luis Aleixo
Browse files

Create a new QRcode for the PDF version

parent 3782cd05
...@@ -56,7 +56,7 @@ p.notes { ...@@ -56,7 +56,7 @@ p.notes {
margin: 1% margin: 1%
} }
#pdf-qr-code { #pdf_qrcode_aref {
margin-right: 1%; margin-right: 1%;
width: 100pt; width: 100pt;
} }
...@@ -102,11 +102,6 @@ p.notes { ...@@ -102,11 +102,6 @@ p.notes {
border-radius: 5px; border-radius: 5px;
} }
.print-button {
margin-left: auto;
margin-right: 1%;
}
/* @media (width: 1200px) { */ /* @media (width: 1200px) { */
@media print { @media print {
/* #body { /* #body {
...@@ -120,7 +115,7 @@ p.notes { ...@@ -120,7 +115,7 @@ p.notes {
#link_reproduce_results { #link_reproduce_results {
display: none!important; display: none!important;
} }
#pdf-qr-code { #pdf_qrcode_aref {
visibility: inherit!important; visibility: inherit!important;
} }
.collapse { .collapse {
...@@ -138,9 +133,6 @@ p.notes { ...@@ -138,9 +133,6 @@ p.notes {
.icon_button { .icon_button {
display: none!important; display: none!important;
} }
.print-button {
display: none!important;
}
.card { .card {
page-break-inside: avoid; page-break-inside: avoid;
} }
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
<h2 class="text-component-title mb-0">CARA - CALCULATOR REPORT</h1> <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> <p class="mb-0"> Created {{ creation_date }} using CARA calculator version v{{ form.calculator_version }}</p>
</div> </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> </div>
{% endblock report_header %} {% endblock report_header %}
...@@ -443,6 +444,11 @@ ...@@ -443,6 +444,11 @@
width: 330, width: 330,
height: 330} height: 330}
); );
new QRCode(document.getElementById("pdf_qrcode"), {
text: "{{ permalink.shortened }}",
width: 133,
height: 133}
);
</script> </script>
</body> </body>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment