mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Print empty cylinder, if needed
When the dive that is used to generate the header, we need to print empty cylinders for the dives that had less cylinders than the one used for header printing. Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
parent
108b30e8b5
commit
3dc5ac219d
1 changed files with 33 additions and 0 deletions
|
@ -306,6 +306,12 @@
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
|
|
||||||
|
<xsl:if test="count(cylinder) < $cylinders">
|
||||||
|
<xsl:call-template name="emptyCylinder">
|
||||||
|
<xsl:with-param name="count" select="$cylinders - count(cylinder)"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<!-- Old location format -->
|
<!-- Old location format -->
|
||||||
<xsl:when test="location != ''">
|
<xsl:when test="location != ''">
|
||||||
|
@ -568,4 +574,31 @@
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
<!-- Template to fill in non-existent cylinder info to CSV -->
|
||||||
|
<xsl:template name="emptyCylinder">
|
||||||
|
<xsl:param name="count"/>
|
||||||
|
|
||||||
|
<xsl:if test="$count > 0">
|
||||||
|
<xsl:value-of select="$fs"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:value-of select="$fs"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:value-of select="$fs"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:value-of select="$fs"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:value-of select="$fs"/>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:text>"</xsl:text>
|
||||||
|
<xsl:call-template name="emptyCylinder">
|
||||||
|
<xsl:with-param name="count" select="$count - 1"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
Loading…
Reference in a new issue