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>
111 % if game_type_cd == 'ctf':
112 <thead class="ctf ${pgstat.team_html_color()}">
114 <th class="nick">Nick</th>
116 <th class="ping">Ping</th>
118 <th class="kills">Kills</th>
119 <th class="captures">Captures</th>
120 <th class="pickups">Pickups</th>
121 <th class="fck" title="Flag Carrier Kill">FCK</th>
122 <th class="returns">Returns</th>
123 <th class="score">Score</th>
131 % if game_type_cd == 'dom':
132 <thead class="dom ${pgstat.team_html_color()}">
134 <th class="nick">Nick</th>
136 <th class="ping">Ping</th>
138 <th class="kills">Kills</th>
139 <th class="deaths">Deaths</th>
140 <th class="takes">Takes</th>
141 <th class="ticks">Ticks</th>
142 <th class="score">Score</th>
150 % if game_type_cd in 'ft' 'freezetag':
151 <thead class="freezetag ${pgstat.team_html_color()}">
153 <th class="nick">Nick</th>
155 <th class="ping">Ping</th>
157 <th class="kills">Kills</th>
158 <th class="deaths">Deaths</th>
159 <th class="revivals">Revivals</th>
160 <th class="score">Score</th>
168 % if game_type_cd in 'ka' 'keepaway':
171 <th class="nick">Nick</th>
173 <th class="ping">Ping</th>
175 <th class="kills">Kills</th>
176 <th class="deaths">Deaths</th>
177 <th class="pickups">Pickups</th>
178 <th class="bctime">BC Time</th>
179 <th class="bckills">BC Kills</th>
187 % if game_type_cd == 'kh':
188 <thead class="kh ${pgstat.team_html_color()}">
190 <th class="nick">Nick</th>
192 <th class="ping">Ping</th>
194 <th class="kills">Kills</th>
195 <th class="deaths">Deaths</th>
196 <th class="pickups">Pickups</th>
197 <th class="caps">Captures</th>
198 <th class="losses">Losses</th>
199 <th class="pushes">Pushes</th>
200 <th class="destroys">Destroys</th>
201 <th class="kckills">KC Kills</th>
202 <th class="score">Score</th>
210 % if game_type_cd in 'nb' 'nexball':
211 <thead class="nb ${pgstat.team_html_color()}">
213 <th class="nick">Nick</th>
215 <th class="ping">Ping</th>
217 <th class="goals">Goals</th>
218 <th class="faults">Faults</th>
219 <th class="score">Score</th>
227 % if game_type_cd == 'rc':
230 <th class="nick">Nick</th>
232 <th class="ping">Ping</th>
234 <th class="laps">Laps</th>
235 <th class="fastest">Fastest Lap</th>
236 <th class="time">Time</th>
243 ##### SCOREBOARD ROWS #####
244 <%def name="scoreboard_row(game_type_cd, pgstat)">
245 % if game_type_cd == 'as':
246 <td>${pgstat.kills}</td>
247 <td>${pgstat.deaths}</td>
248 <td>${pgstat.suicides}</td>
249 <td>${pgstat.collects}</td>
252 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
253 <td>${pgstat.kills}</td>
254 <td>${pgstat.deaths}</td>
255 <td>${pgstat.suicides}</td>
258 % if game_type_cd == 'cq':
259 <td>${pgstat.kills}</td>
260 <td>${pgstat.deaths}</td>
261 <td>${pgstat.captures}</td>
262 <td>${pgstat.drops}</td>
265 % if game_type_cd == 'cts':
266 % if pgstat.fastest is not None:
267 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
273 % if game_type_cd == 'ctf':
274 <td>${pgstat.kills}</td>
275 <td>${pgstat.captures}</td>
276 <td>${pgstat.pickups}</td>
277 <td>${pgstat.carrier_frags}</td>
278 <td>${pgstat.returns}</td>
281 % if game_type_cd == 'dom':
282 <td>${pgstat.kills}</td>
283 <td>${pgstat.deaths}</td>
284 <td>${pgstat.pickups}</td>
285 <td>${pgstat.drops}</td>
288 % if game_type_cd in 'ft' 'freezetag':
289 <td>${pgstat.kills}</td>
290 <td>${pgstat.deaths}</td>
291 <td>${pgstat.revivals}</td>
294 % if game_type_cd in 'ka' 'keepaway':
295 <td>${pgstat.kills}</td>
296 <td>${pgstat.deaths}</td>
297 <td>${pgstat.pickups}</td>
299 % if pgstat.time is not None:
300 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
305 <td>${pgstat.fckills}</td>
308 % if game_type_cd == 'kh':
309 <td>${pgstat.kills}</td>
310 <td>${pgstat.deaths}</td>
311 <td>${pgstat.pickups}</td>
312 <td>${pgstat.captures}</td>
313 <td>${pgstat.drops}</td>
314 <td>${pgstat.pushes}</td>
315 <td>${pgstat.destroys}</td>
316 <td>${pgstat.carrier_frags}</td>
319 % if game_type_cd in 'nb' 'nexball':
320 <td>${pgstat.captures}</td>
321 <td>${pgstat.drops}</td>
324 % if game_type_cd == 'rc':
325 <td>${pgstat.laps}</td>
327 % if pgstat.fastest is not None:
328 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
333 % if pgstat.time is not None:
334 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>