[PATCH 1 of 2] issue1631: Allow loading of some former historical-discharge facets

Wald Commits scm-commit at wald.intevation.org
Mon Nov 18 12:30:13 CET 2013


# HG changeset patch
# User Felix Wolfsteller <felix.wolfsteller at intevation.de>
# Date 1384773742 -3600
# Node ID 8fd314253839d5664dbab8c61fc06e7428fe4167
# Parent  6f6a63ab3ced64a05d4023b5e781a3e469ac13ec
issue1631: Allow loading of some former historical-discharge facets.

diff -r 6f6a63ab3ced -r 8fd314253839 artifacts/doc/conf/meta-data.xml
--- a/artifacts/doc/conf/meta-data.xml	Thu Nov 14 12:02:26 2013 +0100
+++ b/artifacts/doc/conf/meta-data.xml	Mon Nov 18 12:22:22 2013 +0100
@@ -394,6 +394,9 @@
                     <dc:when test="$out = 'bed_difference_epoch'">
                       <dc:call-macro name="longitudinal-section-user-prototype"/>
                     </dc:when>
+                    <dc:when test="$out = 'historical_discharge'">
+                      <dc:call-macro name="historical-discharge-user"/>
+                    </dc:when>
                     <dc:when test="starts-with($out, 'sq_relation')">
                       <dc:call-macro name="sqrelations_user"/>
                     </dc:when>
@@ -408,6 +411,29 @@
 
     <!-- Macros to load user data -->
 
+    <dc:macro name="historical-discharge-user">
+      <dc:filter expr="$out = 'historical_discharge' and ($facet_name = 'historical_discharge.historicalq' or $facet_name = 'historical_discharge.historicalw')">
+        <dc:if test="dc:has-result()">
+          <historical_discharges>
+            <dc:call-macro name="collection-group">
+              <discharges description="{dc:group-key()}">
+                <dc:for-each>
+                  <dc:element name="${facet_name}">
+                    <dc:attribute name="description" value="${facet_description}"/>
+                    <dc:attribute name="factory" value="winfo"/>
+                    <dc:attribute name="target_out" value="${out}"/>
+                    <dc:attribute name="artifact-id" value="${a_gid}"/>
+                    <dc:attribute name="ids" value="${facet_num}"/>
+                    <dc:attribute name="out" value="historical_discharge"/>
+                  </dc:element>
+                </dc:for-each>
+              </discharges>
+            </dc:call-macro>
+          </historical_discharges>
+        </dc:if>
+      </dc:filter>
+    </dc:macro>
+
     <dc:macro name="differences">
       <dc:filter expr="$facet_name = 'w_differences'">
         <dc:if test="dc:has-result()">


More information about the Dive4elements-commits mailing list