]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/scoreboard.mako
Add views for player captimes (all the fastest caps per player) and map captimes...
[xonotic/xonstat.git] / xonstat / templates / scoreboard.mako
index 288e271eb2fb3a02610f191e7563cc11089776d4..5064bb1244a05d61883a02d484ee78d5a50d575b 100644 (file)
@@ -1,4 +1,4 @@
-<%def name="scoreboard(game_type_cd, pgstats)">
+<%def name="scoreboard(game_type_cd, pgstats, show_elo=False)">
 <table  class="table table-bordered table-condensed">
 ${scoreboard_header(game_type_cd, pgstats[0])}
   <tbody>
@@ -14,8 +14,20 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
         <span class="nick">${pgstat.nick_html_colors()|n}</span>
       % endif
       </td>
-    ${scoreboard_row(game_type_cd, pgstat)}
+      % if pgstat.avg_latency is not None:
+      <td>
+        ${int(round(pgstat.avg_latency))}
+      </td>
+      % endif
+      ${scoreboard_row(game_type_cd, pgstat)}
       <td>${pgstat.score}</td>
+      % if show_elo:
+        % if pgstat.elo_delta is not None:
+        <td>${round(pgstat.elo_delta,2)}</td>
+        % else:
+        <td>-</td>
+        % endif
+      % endif
     </tr>
   % endfor
   </tbody>
@@ -28,10 +40,16 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
     <thead>
     <tr>
       <th class="nick">Nick</th>
+      % if pgstat.avg_latency is not None:
+      <th class="ping">Ping</th>
+      % endif
       <th class="kills">Kills</th>
       <th class="deaths">Deaths</th>
       <th class="suicides">Suicides</th>
       <th class="score">Score</th>
+      % if show_elo:
+      <th>Elo Change</th>
+      % endif
     </tr>
     </thead>
 % endif
@@ -40,12 +58,18 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
     <thead class="ctf ${pgstat.team_html_color()}">
     <tr>
       <th class="nick">Nick</th>
+      % if pgstat.avg_latency is not None:
+      <th class="ping">Ping</th>
+      % endif
       <th class="kills">Kills</th>
       <th class="captures">Captures</th>
       <th class="pickups">Pickups</th>
       <th class="fck" title="Flag Carrier Kill">FCK</th>
       <th class="returns">Returns</th>
       <th class="score">Score</th>
+      % if show_elo:
+      <th>Elo Change</th>
+      % endif
     </tr>
     </thead>
 % endif
@@ -54,8 +78,14 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
     <thead class="ca ${pgstat.team_html_color()}">
     <tr>
       <th class="nick">Nick</th>
+      % if pgstat.avg_latency is not None:
+      <th class="ping">Ping</th>
+      % endif
       <th class="kills">Kills</th>
       <th class="score">Score</th>
+      % if show_elo:
+      <th>Elo Change</th>
+      % endif
     </tr>
     </thead>
 % endif
@@ -64,10 +94,16 @@ ${scoreboard_header(game_type_cd, pgstats[0])}
     <thead class="freezetag ${pgstat.team_html_color()}">
     <tr>
       <th class="nick">Nick</th>
+      % if pgstat.avg_latency is not None:
+      <th class="ping">Ping</th>
+      % endif
       <th class="kills">Kills</th>
       <th class="deaths">Deaths</th>
       <th class="suicides">Suicides</th>
       <th class="score">Score</th>
+      % if show_elo:
+      <th>Elo Change</th>
+      % endif
     </tr>
     </thead>
 % endif