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

Workaround for flys/issue1161: Render gauge names into tooltip, too.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 11 Apr 2013 18:58:33 +0200
parents c8193b600d9b
children
line wrap: on
line diff
--- a/flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl	Thu Apr 11 16:39:29 2013 +0200
+++ b/flys-client/src/main/webapp/WEB-INF/stylesheets/fixoverview2html.xsl	Thu Apr 11 18:58:33 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