[PATCH] Format timestamps in datacage tooltip for porosities

Wald Commits scm-commit at wald.intevation.org
Fri Aug 22 08:04:48 CEST 2014


# HG changeset patch
# User "Tom Gottfried <tom at intevation.de>"
# Date 1408687483 -7200
# Node ID a9a6414b3563a46521e8ed4183ad728cb973c292
# Parent  f2fa88f5f75163c83199b986a76e3a37537a64dc
Format timestamps in datacage tooltip for porosities.

diff -r f2fa88f5f751 -r a9a6414b3563 artifacts/doc/conf/meta-data.xml
--- 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  || '<BR>' ||
                 'Tiefe: ' || d.lower || ' - ' || d.upper 
                     || ' cm <BR>' ||
-                '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>
diff -r f2fa88f5f751 -r a9a6414b3563 artifacts/doc/datacage_ref_de.rst
--- 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


More information about the Dive4Elements-commits mailing list