]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Fix display of KA games.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 20 Jul 2013 15:06:41 +0000 (11:06 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 20 Jul 2013 15:06:41 +0000 (11:06 -0400)
xonstat/templates/scoreboard.mako

index 44068d0f3bf2b956a6d411d3b97326ccb4523b95..9fb311cb0f99d213bdeea80e517861576957f7d7 100644 (file)
@@ -3,36 +3,39 @@
   ${scoreboard_header(game_type_cd, pgstats[0])}
   <tbody>
   % for pgstat in pgstats:
-  <tr class="${pgstat.team_html_color()}">
-    <td class="player-nick">
-      % if pgstat.player_id > 2:
-      <a href="${request.route_url("player_info", id=pgstat.player_id)}"
-        title="Go to the info page for this player">
-        <span class="nick">${pgstat.nick_html_colors()|n}</span>
-      </a>
-      % else:
-      <span class="nick">${pgstat.nick_html_colors()|n}</span>
+    <tr class="${pgstat.team_html_color()}">
+      <td class="player-nick">
+        % if pgstat.player_id > 2:
+          <a href="${request.route_url("player_info", id=pgstat.player_id)}"
+            title="Go to the info page for this player">
+            <span class="nick">${pgstat.nick_html_colors()|n}</span>
+          </a>
+        % else:
+          <span class="nick">${pgstat.nick_html_colors()|n}</span>
+        % endif
+      </td>
+      % if show_latency and pgstat.avg_latency is not None:
+        <td>
+          ${int(round(pgstat.avg_latency))}
+        </td>
+      % elif show_latency:
+        <td></td>
       % endif
-    </td>
-    % if show_latency and pgstat.avg_latency is not None:
-    <td>
-      ${int(round(pgstat.avg_latency))}
-    </td>
-    % elif show_latency:
-    <td></td>
-    % endif
-    ${scoreboard_row(game_type_cd, pgstat)}
-    % if game_type_cd != 'cts':
-    <td>${pgstat.score}</td>
-    % endif
-    % if show_elo:
-    % if pgstat.elo_delta is not None:
-    <td>${round(pgstat.elo_delta,2)}</td>
-    % else:
-    <td>-</td>
-    % endif
-    % endif
-  </tr>
+
+      ${scoreboard_row(game_type_cd, pgstat)}
+
+      % if game_type_cd != 'cts':
+        <td>${pgstat.score}</td>
+      % endif
+
+      % 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>
 </table>
     <th class="pickups">Pickups</th>
     <th class="bctime">BC Time</th>
     <th class="bckills">BC Kills</th>
+    <th class="score">Score</th>
     % if show_elo:
     <th>Elo Change</th>
     % endif
 ##### SCOREBOARD ROWS #####
 <%def name="scoreboard_row(game_type_cd, pgstat)">
 % if game_type_cd == 'as':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.suicides}</td>
-<td>${pgstat.collects}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.suicides}</td>
+  <td>${pgstat.collects}</td>
 % endif
 
 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.suicides}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.suicides}</td>
 % endif
 
 % if game_type_cd == 'cq':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.captures}</td>
-<td>${pgstat.drops}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.captures}</td>
+  <td>${pgstat.drops}</td>
 % endif
 
 % if game_type_cd == 'cts':
-% if pgstat.fastest is not None:
-<td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
-% else:
-<td>-</td>
-% endif
-<td>${pgstat.deaths}</td>
+  % if pgstat.fastest is not None:
+    <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
+  % else:
+    <td>-</td>
+  % endif
+
+  <td>${pgstat.deaths}</td>
 % endif
 
 % if game_type_cd == 'ctf':
-<td>${pgstat.kills}</td>
-<td>${pgstat.captures}</td>
-<td>${pgstat.pickups}</td>
-<td>${pgstat.carrier_frags}</td>
-<td>${pgstat.returns}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.captures}</td>
+  <td>${pgstat.pickups}</td>
+  <td>${pgstat.carrier_frags}</td>
+  <td>${pgstat.returns}</td>
 % endif
 
 % if game_type_cd == 'dom':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.pickups}</td>
-<td>${pgstat.drops}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.pickups}</td>
+  <td>${pgstat.drops}</td>
 % endif
 
 % if game_type_cd in 'ft' 'freezetag':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.revivals}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.revivals}</td>
 % endif
 
 % if game_type_cd in 'ka' 'keepaway':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.pickups}</td>
-
-% if pgstat.time is not None:
-<td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
-% else:
-<td>-</td>
-% endif
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.pickups}</td>
 
-<td>${pgstat.fckills}</td>
+  % if pgstat.time is not None:
+    <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
+  % else:
+    <td>-</td>
+  % endif
+
+  <td>${pgstat.carrier_frags}</td>
 % endif
 
 % if game_type_cd == 'kh':
-<td>${pgstat.kills}</td>
-<td>${pgstat.deaths}</td>
-<td>${pgstat.pickups}</td>
-<td>${pgstat.captures}</td>
-<td>${pgstat.drops}</td>
-<td>${pgstat.pushes}</td>
-<td>${pgstat.destroys}</td>
-<td>${pgstat.carrier_frags}</td>
+  <td>${pgstat.kills}</td>
+  <td>${pgstat.deaths}</td>
+  <td>${pgstat.pickups}</td>
+  <td>${pgstat.captures}</td>
+  <td>${pgstat.drops}</td>
+  <td>${pgstat.pushes}</td>
+  <td>${pgstat.destroys}</td>
+  <td>${pgstat.carrier_frags}</td>
 % endif
 
 % if game_type_cd in 'nb' 'nexball':
-<td>${pgstat.captures}</td>
-<td>${pgstat.drops}</td>
+  <td>${pgstat.captures}</td>
+  <td>${pgstat.drops}</td>
 % endif
 
 % if game_type_cd == 'rc':
-<td>${pgstat.laps}</td>
+  <td>${pgstat.laps}</td>
 
-% if pgstat.fastest is not None:
-<td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
-% else:
-<td>-</td>
-% endif
+  % if pgstat.fastest is not None:
+    <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
+  % else:
+    <td>-</td>
+  % endif
 
-% if pgstat.time is not None:
-<td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
-% else:
-<td>-</td>
-% endif
+  % if pgstat.time is not None:
+    <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
+  % else:
+    <td>-</td>
+  % endif
 % endif
 
 </%def>