changeset 6324:3cf9e82b9c75

Add location handling in waterlevels-fix macro For uesk calculations don't show locations For everything else change the description when we are at a location
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 13 Jun 2013 10:01:01 +0200
parents f49749526af4
children ee701de9c875
files artifacts/doc/conf/meta-data.xml
diffstat 1 files changed, 11 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Thu Jun 13 09:43:50 2013 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Thu Jun 13 10:01:01 2013 +0200
@@ -672,14 +672,22 @@
 
     <dc:comment>TODO doesnt work nicely for fix/wq-diags. Aheinecke (27.5.2013): Why?</dc:comment>
     <dc:macro name="waterlevels-fix">
-      <dc:filter expr="$out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w'">
+      <dc:filter expr="($out_name = 'longitudinal_section' and $facet_name = 'longitudinal_section.w') and
+        (not ($current-state-id = 'state.winfo.uesk.wsp' and $ld_m = 'location'))">
         <dc:if test="dc:has-result()">
           <waterlevels>
             <dc:group expr="concat($river, ' ', dc:date-format('dd.MM.yyyy - H:m:s', $a_creation), ' ', $collection_name)">
               <waterlevels description="{dc:group-key()}">
                 <dc:for-each>
-                  <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
-                    $deffrom, ' bis KM ', $defto)"/>
+                  <dc:choose>
+                    <dc:when test="$ld_m = 'location'">
+                      <dc:variable name="combined_desc" expr="concat($facet_description, ' an KM ', $deffrom)"/>
+                    </dc:when>
+                    <dc:otherwise>
+                      <dc:variable name="combined_desc" expr="concat($facet_description, ' von KM ',
+                        $deffrom, ' bis KM ', $defto)"/>
+                    </dc:otherwise>
+                  </dc:choose>
                   <dc:element name="${facet_name}">
                     <dc:attribute name="description" value="${combined_desc}"/>
                     <dc:attribute name="ids" value="${facet_num}"/>

http://dive4elements.wald.intevation.org