summaryrefslogtreecommitdiffstats
path: root/printing_templates
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-28 13:35:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-28 13:37:14 -0700
commita4608f7c91138401e9987ff0478bbe42408a37a7 (patch)
treec9f48cf556a1ca39604fe5045acfe2e44087b38e /printing_templates
parentbe47ce624170cfce7e9763e5530f0be3555c187d (diff)
downloadsubsurface-a4608f7c91138401e9987ff0478bbe42408a37a7.tar.gz
Printing: fix dive lookup for profile generation
The existing code (and templates) looked up dives by number and then used that as index into the dive table. This worked exactly in one case: if all dives were numbered consecutively starting with 1. While that is not an entirely unreasonable case, it's of course not an acceptable assumption to make. This commit adds the necessary changes to instead look up dives by their unique id. That's what it's there fore, after all. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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 9f4d30a61..40c02b395 100644
--- a/printing_templates/One Dive.html
+++ b/printing_templates/One Dive.html
@@ -103,7 +103,7 @@
<div class="mainContainer">
<div class="innerContainer">
<div class="diveDetails">
- <div class="diveProfile" id="dive_{{ dive.number }}">
+ <div class="diveProfile" id="dive_{{ dive.id }}">
</div>
<div class="dataSection">
<table class="table_class">
diff --git a/printing_templates/Two Dives.html b/printing_templates/Two Dives.html
index 0c8eec14c..986f119dd 100644
--- a/printing_templates/Two Dives.html
+++ b/printing_templates/Two Dives.html
@@ -196,7 +196,7 @@
</td>
</tr>
</tbody></table>
- <div class="diveProfile" id="dive_{{ dive.number }}">
+ <div class="diveProfile" id="dive_{{ dive.id }}">
</div>
</div>
<div class="notesPart">