aboutsummaryrefslogtreecommitdiffstats
path: root/xslt
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2018-04-28 12:20:39 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2018-05-01 22:42:10 +0300
commit12e4b6d62c06cde3e8ad0d1202ebd52b020f693c (patch)
treeff47ddc9bd3c204d9000dd8d823948dc614a3966 /xslt
parentc53442e37edb19f9481f4f0bb7e6b7b7773aea43 (diff)
downloadsubsurface-12e4b6d62c06cde3e8ad0d1202ebd52b020f693c.tar.gz
CSV import: include visibility and rating in import
Add support for visibility and rating to CSV import dialog. Fixes #1212 Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'xslt')
-rw-r--r--xslt/manualcsv2xml.xslt20
1 files changed, 20 insertions, 0 deletions
diff --git a/xslt/manualcsv2xml.xslt b/xslt/manualcsv2xml.xslt
index 3f7f15d8a..2382ddb01 100644
--- a/xslt/manualcsv2xml.xslt
+++ b/xslt/manualcsv2xml.xslt
@@ -26,6 +26,8 @@
<xsl:param name="cylindersizeField" select="cylindersizeField"/>
<xsl:param name="startpressureField" select="startpressureField"/>
<xsl:param name="endpressureField" select="endpressureField"/>
+ <xsl:param name="visibilityField" select="visibilityField"/>
+ <xsl:param name="ratingField" select="ratingField"/>
<xsl:param name="o2Field" select="o2Field"/>
<xsl:param name="heField" select="heField"/>
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
@@ -205,6 +207,24 @@
</xsl:attribute>
</xsl:if>
+ <xsl:if test="$visibilityField >= 0">
+ <xsl:attribute name="visibility">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$visibilityField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+
+ <xsl:if test="$ratingField >= 0">
+ <xsl:attribute name="rating">
+ <xsl:call-template name="getFieldByIndex">
+ <xsl:with-param name="index" select="$ratingField"/>
+ <xsl:with-param name="line" select="$line"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ </xsl:if>
+
<divecomputer deviceid="ffffffff" model="csv" />
<xsl:if test="$locationField &gt;= 0 or $gpsField &gt;= 0">