1 <%def name="scoreboard(game_type_cd, pgstats, show_elo=False, show_latency=False)">
2 <table class="table-hover table-condensed">
3 ${scoreboard_header(game_type_cd, pgstats[0])}
5 % for pgstat in pgstats:
6 <tr class="${pgstat.team_html_color()}">
7 % if show_latency and pgstat.avg_latency is not None:
8 <td class="show-for-medium-up text-center">
9 ${int(round(pgstat.avg_latency))}
12 <td class="show-for-medium-up text-center">-</td>
15 <td class="small-5 medium-3 no-stretch">
16 % if pgstat.player_id > 2:
17 <a href="${request.route_url("player_info", id=pgstat.player_id)}" title="Go to the info page for this player">
18 ${pgstat.nick_html_colors()|n}
21 ${pgstat.nick_html_colors()|n}
25 ${scoreboard_row(game_type_cd, pgstat)}
27 % if game_type_cd != 'cts':
28 <td class="small-3 player-score">${pgstat.score}</td>
32 % if pgstat.elo_delta is not None:
33 <td class="show-for-medium-up">${round(pgstat.elo_delta,2)}</td>
35 <td class="show-for-medium-up">-</td>
44 ##### SCOREBOARD HEADER #####
45 <%def name="scoreboard_header(game_type_cd, pgstat)">
46 % if game_type_cd == 'as':
50 <th class="small-1">Ping</th>
52 <th class="small-4">Nick</th>
57 <th class="medium-1">Score</th>
65 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
69 <th class="show-for-medium-up medium-1">Ping</th>
71 <th class="small-5 medium-3">Nick</th>
73 <th class="show-for-medium-up">Deaths</th>
74 <th class="show-for-medium-up">Suicides</th>
75 <th class="small-3 medium-1">Score</th>
77 <th class="show-for-medium-up">Elo Change</th>
83 % if game_type_cd == 'cq':
87 <th class="small-1">Ping</th>
89 <th class="small-2">Nick</th>
102 % if game_type_cd == 'cts':
106 <th class="small-1">Ping</th>
108 <th class="small-2">Nick</th>
109 <th>Fastest Time</th>
115 % if game_type_cd == 'ctf':
116 <thead class="ctf ${pgstat.team_html_color()}">
119 <th class="show-for-medium-up medium-1">Ping</th>
121 <th class="small-5 medium-3">Nick</th>
122 <th class="show-for-medium-up">Kills</th>
124 <th class="show-for-medium-up">Pickups</th>
125 <th class="show-for-medium-up" title="Flag Carrier Kill">FCK</th>
126 <th class="show-for-medium-up">Returns</th>
127 <th class="medium-1">Score</th>
135 % if game_type_cd == 'dom':
136 <thead class="dom ${pgstat.team_html_color()}">
139 <th class="small-1">Ping</th>
141 <th class="small-2">Nick</th>
154 % if game_type_cd in 'ft' 'freezetag':
155 <thead class="freezetag ${pgstat.team_html_color()}">
158 <th class="small-1">Ping</th>
160 <th class="small-2">Nick</th>
172 % if game_type_cd in 'ka' 'keepaway':
176 <th class="small-1">Ping</th>
178 <th class="small-2">Nick</th>
192 % if game_type_cd == 'kh':
193 <thead class="kh ${pgstat.team_html_color()}">
196 <th class="show-for-medium-up medium-1">Ping</th>
198 <th class="small-5 medium-3">Nick</th>
199 <th class="show-for-medium-up">Kills</th>
200 <th class="show-for-medium-up">Deaths</th>
201 <th class="show-for-medium-up">Pickups</th>
203 <th class="show-for-medium-up">Losses</th>
204 <th class="show-for-medium-up">KC Kills</th>
205 <th class="small-3 medium-1">Score</th>
207 <th class="show-for-medium-up">Elo Change</th>
213 % if game_type_cd in 'nb' 'nexball':
214 <thead class="nb ${pgstat.team_html_color()}">
217 <th class="small-1">Ping</th>
219 <th class="small-2">Nick</th>
230 % if game_type_cd == 'rc':
234 <th class="small-1">Ping</th>
236 <th class="small-2">Nick</th>
246 ##### SCOREBOARD ROWS #####
247 <%def name="scoreboard_row(game_type_cd, pgstat)">
248 % if game_type_cd == 'as':
249 <td>${pgstat.kills}</td>
250 <td>${pgstat.deaths}</td>
251 <td>${pgstat.suicides}</td>
252 <td>${pgstat.collects}</td>
255 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
256 <td class="small-3">${pgstat.kills}</td>
257 <td class="show-for-medium-up">${pgstat.deaths}</td>
258 <td class="show-for-medium-up">${pgstat.suicides}</td>
261 % if game_type_cd == 'cq':
262 <td>${pgstat.kills}</td>
263 <td>${pgstat.deaths}</td>
264 <td>${pgstat.captures}</td>
265 <td>${pgstat.drops}</td>
268 % if game_type_cd == 'cts':
269 % if pgstat.fastest is not None:
270 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
275 <td>${pgstat.deaths}</td>
278 % if game_type_cd == 'ctf':
279 <td class="show-for-medium-up">${pgstat.kills}</td>
280 <td>${pgstat.captures}</td>
281 <td class="show-for-medium-up">${pgstat.pickups}</td>
282 <td class="show-for-medium-up">${pgstat.carrier_frags}</td>
283 <td class="show-for-medium-up">${pgstat.returns}</td>
286 % if game_type_cd == 'dom':
287 <td>${pgstat.kills}</td>
288 <td>${pgstat.deaths}</td>
289 <td>${pgstat.pickups}</td>
290 <td>${pgstat.drops}</td>
293 % if game_type_cd in 'ft' 'freezetag':
294 <td>${pgstat.kills}</td>
295 <td>${pgstat.deaths}</td>
296 <td>${pgstat.revivals}</td>
299 % if game_type_cd in 'ka' 'keepaway':
300 <td>${pgstat.kills}</td>
301 <td>${pgstat.deaths}</td>
302 <td>${pgstat.pickups}</td>
304 % if pgstat.time is not None:
305 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
310 <td>${pgstat.carrier_frags}</td>
313 % if game_type_cd == 'kh':
314 <td class="show-for-medium-up">${pgstat.kills}</td>
315 <td class="show-for-medium-up">${pgstat.deaths}</td>
316 <td class="show-for-medium-up">${pgstat.pickups}</td>
317 <td class="show-for-medium-up">${pgstat.captures}</td>
318 <td class="show-for-medium-up">${pgstat.drops}</td>
319 <td>${pgstat.carrier_frags}</td>
322 % if game_type_cd in 'nb' 'nexball':
323 <td>${pgstat.captures}</td>
324 <td>${pgstat.drops}</td>
327 % if game_type_cd == 'rc':
328 <td>${pgstat.laps}</td>
330 % if pgstat.fastest is not None:
331 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
336 % if pgstat.time is not None:
337 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>