aboutsummaryrefslogtreecommitdiff
path: root/templates/mail/deviceOverspeed.vm
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-24 23:28:27 +1300
committerGitHub <noreply@github.com>2017-03-24 23:28:27 +1300
commitf094a26a9f66a85ee3111a4c8ca8a46276cdf968 (patch)
tree72de6c42c337d7f4efac3c003ef8abbd782a02d0 /templates/mail/deviceOverspeed.vm
parent8b343b37d623daf74692b62d2ffcfc6e4bce9bd6 (diff)
parent4597f97cf2020f900f36af2867d1129d9bebd54d (diff)
downloadtrackermap-server-f094a26a9f66a85ee3111a4c8ca8a46276cdf968.tar.gz
trackermap-server-f094a26a9f66a85ee3111a4c8ca8a46276cdf968.tar.bz2
trackermap-server-f094a26a9f66a85ee3111a4c8ca8a46276cdf968.zip
Merge pull request #3050 from Abyss777/format_template
Format speed in notification templates
Diffstat (limited to 'templates/mail/deviceOverspeed.vm')
-rw-r--r--templates/mail/deviceOverspeed.vm8
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/mail/deviceOverspeed.vm b/templates/mail/deviceOverspeed.vm
index 3b203ddcd..0715a3d60 100644
--- a/templates/mail/deviceOverspeed.vm
+++ b/templates/mail/deviceOverspeed.vm
@@ -1,10 +1,12 @@
#set($subject = "$device.name: exceeds the speed")
#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
<!DOCTYPE html>
<html>