changeset 8119:a9a6414b3563

Format timestamps in datacage tooltip for porosities.
author "Tom Gottfried <tom@intevation.de>"
date Fri, 22 Aug 2014 08:04:43 +0200
parents f2fa88f5f751
children b57f4bcd0f6f
files artifacts/doc/conf/meta-data.xml artifacts/doc/datacage_ref_de.rst
diffstat 2 files changed, 7 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/doc/conf/meta-data.xml	Thu Aug 21 18:58:10 2014 +0200
+++ b/artifacts/doc/conf/meta-data.xml	Fri Aug 22 08:04:43 2014 +0200
@@ -1356,8 +1356,9 @@
                 p.description  || '&lt;BR&gt;' ||
                 'Tiefe: ' || d.lower || ' - ' || d.upper 
                     || ' cm &lt;BR&gt;' ||
-                'Zeitraum: ' || t.start_time || ' - ' || t.stop_time
-                AS info
+                'Zeitraum: ' AS info,
+                t.start_time AS syear,
+                t.stop_time AS eyear
             FROM     porosity p
                 JOIN depths d ON p.depth_id = d.id
                 JOIN time_intervals t ON p.time_interval_id=t.id
@@ -1369,7 +1370,8 @@
                   <porosity description="{$depth_lower}-{$depth_upper} cm"
                    factory="porosity"
                    target_out="{$out}"
-                   info="{$info}"
+                   info="{concat($info, dc:date-format('yyyy', $syear),
+                             ' - ', dc:date-format('yyyy', $eyear))}"
                    ids="{$pid};{$description}" />
           </dc:for-each>
         </dc:if>
--- a/artifacts/doc/datacage_ref_de.rst	Thu Aug 21 18:58:10 2014 +0200
+++ b/artifacts/doc/datacage_ref_de.rst	Fri Aug 22 08:04:43 2014 +0200
@@ -711,8 +711,8 @@
 
 .. _SimpleFormat: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
 
-``dc::date-format(''dd.MM.yyyy', $datum,)`` liefert für ein ``$datum`` mit dem Wert 1. Dezember 1941
-den String ``01.12.1941``.
+``dc:date-format('dd.MM.yyyy', $datum)`` liefert für ein ``$datum``
+mit dem Wert 1. Dezember 1941 den String ``01.12.1941``.
 
 
 ``dc:group-key`` Wert des aktuellen Gruppierungsschlüssels

http://dive4elements.wald.intevation.org