aboutsummaryrefslogtreecommitdiffstats
path: root/printing_templates
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2015-07-04 23:54:15 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2015-07-05 21:01:53 +0300
commit815072d2ae29811271af197e2330cc331d58f9c6 (patch)
tree8f4af73312cb1651e77ab185903a96ee54097272 /printing_templates
parent6446b75b9e358bf3c7969b7df302410b39249948 (diff)
downloadsubsurface-815072d2ae29811271af197e2330cc331d58f9c6.tar.gz
Printing: retrieve number of dives per page from the template file
Add special data attribute 'data-numberofdives' in the template <body> with the number of dives per page. This is standard HTML5 specification so it won't corrupt the template file. Any template that will be used for printing must contain this attribute to assure correct output. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'printing_templates')
-rw-r--r--printing_templates/one_dive.html2
-rw-r--r--printing_templates/two_dives.html2
2 files changed, 2 insertions, 2 deletions
diff --git a/printing_templates/one_dive.html b/printing_templates/one_dive.html
index 87b2976e0..d7ae8d477 100644
--- a/printing_templates/one_dive.html
+++ b/printing_templates/one_dive.html
@@ -92,7 +92,7 @@
}
</style>
</head>
-<body>
+<body data-numberofdives = 1>
{% block main_rows %}
{% for dive in dives %}
<div class="mainContainer">
diff --git a/printing_templates/two_dives.html b/printing_templates/two_dives.html
index b0ad9ba15..62502272b 100644
--- a/printing_templates/two_dives.html
+++ b/printing_templates/two_dives.html
@@ -102,7 +102,7 @@
}
</style>
</head>
-<body>
+<body data-numberofdives = 2>
{% block main_rows %}
{% for dive in dives %}
<div class="mainContainer">