diff flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl @ 5777:e95427ed80e5

Merged
author Sascha L. Teichmann <teichmann@intevation.de>
date Sun, 21 Apr 2013 10:46:59 +0200
parents a3b170869c77
children
line wrap: on
line diff
--- a/flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl	Sun Apr 21 10:46:06 2013 +0200
+++ b/flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl	Sun Apr 21 10:46:59 2013 +0200
@@ -24,6 +24,13 @@
     </xsl:choose>
   </xsl:variable>
 
+  <xsl:variable name="i18n-gauge">
+    <xsl:choose>
+      <xsl:when test="$locale = 'de'">Pegel</xsl:when>
+      <xsl:otherwise>Gauge</xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+
   <xsl:variable name="i18n-event">
     <xsl:choose>
       <xsl:when test="$locale = 'de'">Ereignis</xsl:when>
@@ -255,6 +262,13 @@
           <xsl:when test="@class = '2'"> / Q <xsl:value-of select="$i18n-around-mhq"/></xsl:when>
           <xsl:when test="@class = '3'"> / Q <xsl:value-of select="$i18n-above-hq5"/></xsl:when>
         </xsl:choose>
+        <xsl:text>&#10;</xsl:text>
+        <xsl:value-of select="$i18n-gauge"/>
+        <xsl:text>:</xsl:text>
+        <xsl:call-template name="find-gauges">
+          <xsl:with-param name="start" select="@from"/>
+          <xsl:with-param name="stop" select="@to"/>
+        </xsl:call-template>
       </xsl:attribute>
       <xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
     </div>
@@ -277,6 +291,18 @@
     </tr>
   </xsl:template>
 
+  <xsl:template match="text()" mode="gauge-list"/>
+  <xsl:template match="gauge" mode="gauge-list">
+    <xsl:text> </xsl:text><xsl:value-of select="@name"/>
+  </xsl:template>
+
+  <xsl:template name="find-gauges">
+    <xsl:param name="start"/>
+    <xsl:param name="stop"/>
+    <xsl:apply-templates mode="gauge-list"
+      select="/fixings/gauges/gauge[not((number(@to) &lt; number($start)) or (number(@from) &gt; number($stop)))]"/>
+  </xsl:template>
+
   <xsl:template match="gauge" mode="gauges">
     <xsl:call-template name="emit-gap-gauge">
       <xsl:with-param name="gauge" select="."/>

http://dive4elements.wald.intevation.org