1 <%def name="scoreboard(game_type_cd, pgstats, show_elo=False, show_latency=False)">
2 <table class="table table-bordered table-condensed">
3 ${scoreboard_header(game_type_cd, pgstats[0])}
5 % for pgstat in pgstats:
6 <tr class="${pgstat.team_html_color()}">
8 % if pgstat.player_id > 2:
9 <a href="${request.route_url("player_info", id=pgstat.player_id)}"
10 title="Go to the info page for this player">
11 <span class="nick">${pgstat.nick_html_colors()|n}</span>
14 <span class="nick">${pgstat.nick_html_colors()|n}</span>
17 % if show_latency and pgstat.avg_latency is not None:
19 ${int(round(pgstat.avg_latency))}
24 ${scoreboard_row(game_type_cd, pgstat)}
25 % if game_type_cd != 'cts':
26 <td>${pgstat.score}</td>
29 % if pgstat.elo_delta is not None:
30 <td>${round(pgstat.elo_delta,2)}</td>
41 ##### SCOREBOARD HEADER #####
42 <%def name="scoreboard_header(game_type_cd, pgstat)">
43 % if game_type_cd == 'as':
46 <th class="nick">Nick</th>
48 <th class="ping">Ping</th>
50 <th class="kills">Kills</th>
51 <th class="deaths">Deaths</th>
52 <th class="suicides">Suicides</th>
53 <th class="objectives">Objectives</th>
54 <th class="score">Score</th>
62 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
65 <th class="nick">Nick</th>
67 <th class="ping">Ping</th>
69 <th class="kills">Kills</th>
70 <th class="deaths">Deaths</th>
71 <th class="suicides">Suicides</th>
72 <th class="score">Score</th>
80 % if game_type_cd == 'cq':
83 <th class="nick">Nick</th>
85 <th class="ping">Ping</th>
87 <th class="kills">Kills</th>
88 <th class="deaths">Deaths</th>
89 <th class="captured">Captured</th>
90 <th class="released">Released</th>
91 <th class="score">Score</th>
99 % if game_type_cd == 'cts':
102 <th class="nick">Nick</th>
104 <th class="ping">Ping</th>
106 <th class="fastest">Fastest Time</th>
107 <th class="deaths">Deaths</th>
112 % if game_type_cd == 'ctf':
113 <thead class="ctf ${pgstat.team_html_color()}">
115 <th class="nick">Nick</th>
117 <th class="ping">Ping</th>
119 <th class="kills">Kills</th>
120 <th class="captures">Captures</th>
121 <th class="pickups">Pickups</th>
122 <th class="fck" title="Flag Carrier Kill">FCK</th>
123 <th class="returns">Returns</th>
124 <th class="score">Score</th>
132 % if game_type_cd == 'dom':
133 <thead class="dom ${pgstat.team_html_color()}">
135 <th class="nick">Nick</th>
137 <th class="ping">Ping</th>
139 <th class="kills">Kills</th>
140 <th class="deaths">Deaths</th>
141 <th class="takes">Takes</th>
142 <th class="ticks">Ticks</th>
143 <th class="score">Score</th>
151 % if game_type_cd in 'ft' 'freezetag':
152 <thead class="freezetag ${pgstat.team_html_color()}">
154 <th class="nick">Nick</th>
156 <th class="ping">Ping</th>
158 <th class="kills">Kills</th>
159 <th class="deaths">Deaths</th>
160 <th class="revivals">Revivals</th>
161 <th class="score">Score</th>
169 % if game_type_cd in 'ka' 'keepaway':
172 <th class="nick">Nick</th>
174 <th class="ping">Ping</th>
176 <th class="kills">Kills</th>
177 <th class="deaths">Deaths</th>
178 <th class="pickups">Pickups</th>
179 <th class="bctime">BC Time</th>
180 <th class="bckills">BC Kills</th>
188 % if game_type_cd == 'kh':
189 <thead class="kh ${pgstat.team_html_color()}">
191 <th class="nick">Nick</th>
193 <th class="ping">Ping</th>
195 <th class="kills">Kills</th>
196 <th class="deaths">Deaths</th>
197 <th class="pickups">Pickups</th>
198 <th class="caps">Captures</th>
199 <th class="losses">Losses</th>
200 <th class="pushes">Pushes</th>
201 <th class="destroys">Destroys</th>
202 <th class="kckills">KC Kills</th>
203 <th class="score">Score</th>
211 % if game_type_cd in 'nb' 'nexball':
212 <thead class="nb ${pgstat.team_html_color()}">
214 <th class="nick">Nick</th>
216 <th class="ping">Ping</th>
218 <th class="goals">Goals</th>
219 <th class="faults">Faults</th>
220 <th class="score">Score</th>
228 % if game_type_cd == 'rc':
231 <th class="nick">Nick</th>
233 <th class="ping">Ping</th>
235 <th class="laps">Laps</th>
236 <th class="fastest">Fastest Lap</th>
237 <th class="time">Time</th>
244 ##### SCOREBOARD ROWS #####
245 <%def name="scoreboard_row(game_type_cd, pgstat)">
246 % if game_type_cd == 'as':
247 <td>${pgstat.kills}</td>
248 <td>${pgstat.deaths}</td>
249 <td>${pgstat.suicides}</td>
250 <td>${pgstat.collects}</td>
253 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
254 <td>${pgstat.kills}</td>
255 <td>${pgstat.deaths}</td>
256 <td>${pgstat.suicides}</td>
259 % if game_type_cd == 'cq':
260 <td>${pgstat.kills}</td>
261 <td>${pgstat.deaths}</td>
262 <td>${pgstat.captures}</td>
263 <td>${pgstat.drops}</td>
266 % if game_type_cd == 'cts':
267 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
268 <td>${pgstat.deaths}</td>
271 % if game_type_cd == 'ctf':
272 <td>${pgstat.kills}</td>
273 <td>${pgstat.captures}</td>
274 <td>${pgstat.pickups}</td>
275 <td>${pgstat.carrier_frags}</td>
276 <td>${pgstat.returns}</td>
279 % if game_type_cd == 'dom':
280 <td>${pgstat.kills}</td>
281 <td>${pgstat.deaths}</td>
282 <td>${pgstat.pickups}</td>
283 <td>${pgstat.drops}</td>
286 % if game_type_cd in 'ft' 'freezetag':
287 <td>${pgstat.kills}</td>
288 <td>${pgstat.deaths}</td>
289 <td>${pgstat.revivals}</td>
292 % if game_type_cd in 'ka' 'keepaway':
293 <td>${pgstat.kills}</td>
294 <td>${pgstat.deaths}</td>
295 <td>${pgstat.pickups}</td>
296 <td>${pgstat.time}</td>
297 <td>${pgstat.fckills}</td>
300 % if game_type_cd == 'kh':
301 <td>${pgstat.kills}</td>
302 <td>${pgstat.deaths}</td>
303 <td>${pgstat.pickups}</td>
304 <td>${pgstat.captures}</td>
305 <td>${pgstat.drops}</td>
306 <td>${pgstat.pushes}</td>
307 <td>${pgstat.destroys}</td>
308 <td>${pgstat.carrier_kills}</td>
311 % if game_type_cd in 'nb' 'nexball':
312 <td>${pgstat.captures}</td>
313 <td>${pgstat.drops}</td>
316 % if game_type_cd == 'rc':
317 <td>${pgstat.laps}</td>
318 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
319 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>