Default dive number on manual CSV import

If manual CSV import does not have any dive number, give a default one
so that the dives get import and not silently ignored.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-11-24 19:23:15 +02:00 committed by Dirk Hohndel
parent f32e6a853e
commit 61ad81cf7a

View file

@ -61,12 +61,17 @@
<xsl:param name="line"/>
<xsl:variable name="number">
<xsl:if test="$numberField >= 0">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$numberField"/>
<xsl:with-param name="line" select="$line"/>
</xsl:call-template>
</xsl:if>
<xsl:choose>
<xsl:when test="$numberField >= 0">
<xsl:call-template name="getFieldByIndex">
<xsl:with-param name="index" select="$numberField"/>
<xsl:with-param name="line" select="$line"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="'0'"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:if test="$number >= 0">