]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Add the game's duration to the game info page, if it exists.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 15 Nov 2012 01:49:30 +0000 (20:49 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 15 Nov 2012 01:49:30 +0000 (20:49 -0500)
xonstat/templates/game_info.mako

index 44d1f9c63d756f36a32cf00df359b367891bd50d..1c0fe3938c52a121b6af9fda63fea86be42a45e6 100644 (file)
@@ -35,6 +35,9 @@ Game Information
       Game Type: ${game.game_type_cd}<br />
       Server: <a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for ${server.name}">${server.name}</a><br />
       Map: <a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for ${map.name}">${map.name}</a><br />
+      % if game.duration is not None:
+        Duration: ${"%s:%02d" % (game.duration.seconds/60, game.duration.seconds%60)}
+      % endif
     </p>
   </div>
 </div>