aboutsummaryrefslogtreecommitdiff
path: root/templates/sms/deviceOverspeed.vm
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-03-24 11:28:36 +0500
committerAbyss777 <abyss@fox5.ru>2017-03-24 11:28:36 +0500
commit4597f97cf2020f900f36af2867d1129d9bebd54d (patch)
tree72de6c42c337d7f4efac3c003ef8abbd782a02d0 /templates/sms/deviceOverspeed.vm
parent8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 (diff)
downloadtrackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.tar.gz
trackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.tar.bz2
trackermap-server-4597f97cf2020f900f36af2867d1129d9bebd54d.zip
Format speed in notification templates
Diffstat (limited to 'templates/sms/deviceOverspeed.vm')
-rw-r--r--templates/sms/deviceOverspeed.vm8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/sms/deviceOverspeed.vm b/templates/sms/deviceOverspeed.vm
index 3c9eae628..ef0d9d955 100644
--- a/templates/sms/deviceOverspeed.vm
+++ b/templates/sms/deviceOverspeed.vm
@@ -1,8 +1,10 @@
#if($speedUnits == 'kmh')
-#set($speedString = $position.speed * 1.852 + ' km/h')
+#set($speedValue = $position.speed * 1.852)
+#set($speedString = $numberTool.format("0.0 km/h", $speedValue))
#elseif($speedUnits == 'mph')
-#set($speedString = $position.speed * 1.15078 + ' mph')
+#set($speedValue = $position.speed * 1.15078)
+#set($speedString = $numberTool.format("0.0 mph", $speedValue))
#else
-#set($speedString = "$position.speed kn")
+#set($speedString = $numberTool.format("0.0 kn", $position.speed))
#end
$device.name exceeds the speed $speedString at $dateTool.format("YYYY-MM-dd HH:mm:ss", $event.serverTime, $locale, $timezone)