]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/game_info.mako
Show the best flag capture times on the game info page.
[xonotic/xonstat.git] / xonstat / templates / game_info.mako
index 141f3a9c65826cd435ff4068094a5f3e42b22fe3..0e3a383ba9c8eb1aa0030bc272cce393e05219ef 100644 (file)
@@ -46,6 +46,40 @@ Game Information
   </div>
 </div>
 
+% if len(captimes) > 0:
+<div class="row">
+  <div class="span6">
+    <h3>Best Flag Capture Times</h3>
+    <table class="table table-bordered table-condensed">
+      <thead>
+        <tr>
+           <th>Nick</th>
+           <th>Captime</th>
+        </tr>
+      </thead>
+      <tbody>
+      % for pgs in captimes:
+        <tr>
+          <td>
+          % if pgs.player_id > 2:
+            <a href="${request.route_url("player_info", id=pgs.player_id)}"
+             title="Go to the info page for this player">
+            <span class="nick">${pgs.nick_html_colors()|n}</span>
+            </a>
+          % else:
+            <span class="nick">${pgs.nick_html_colors()|n}</span>
+          % endif
+          </td>
+          <td>${round(float(pgs.fastest_cap.seconds) + (pgs.fastest_cap.microseconds/1000000.0), 2)}</td>
+        </tr>
+      % endfor
+      </tbody>
+    </table>
+  </div>
+</div>
+% endif
+
+
 % if len(pgstats) > 0:
 <div class="row">
   <div class="span12">