Mercurial > dive4elements > river
changeset 7279:237d5305b1a9
issue1345: Added macro for the differing epoch-description, extended query.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Thu, 10 Oct 2013 11:22:16 +0200 (2013-10-10) |
parents | 03fa985dd044 |
children | 2584a114a350 |
files | artifacts/doc/conf/meta-data.xml |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml Thu Oct 10 11:19:30 2013 +0200 +++ b/artifacts/doc/conf/meta-data.xml Thu Oct 10 11:22:16 2013 +0200 @@ -1306,6 +1306,18 @@ </dc:for-each> </dc:macro> + <dc:macro name="epoch-load"> + <dc:for-each> + <dc:variable name="syear" type="string" expr="dc:date-format('yyyy', $startyear)"/> + <dc:variable name="eyear" type="string" expr="dc:date-format('yyyy', $stopyear)"/> + <year description="{$syear}-${eyear}" + factory="sedimentyield" + target_out="{$out}" + info="{$description}" + ids="{$syid}" /> + </dc:for-each> + </dc:macro> + <dc:macro name="loads"> <dc:if test="dc:has-result()"> <dc:filter expr="$fraction='sand'"> @@ -1382,7 +1394,8 @@ SELECT DISTINCT sy.id AS syid, sy.description AS description, - ti.start_time AS year, + ti.start_time AS startyear, + ti.stop_time AS endyear, gf.name AS fraction FROM sediment_yield sy JOIN rivers r ON sy.river_id = r.id