1 <%def name="scoreboard(game_type_cd, pgstats, show_elo=False, show_latency=False)">
2 <table class="table 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 <td class="player-nick">
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))}
25 ${scoreboard_row(game_type_cd, pgstat)}
27 % if game_type_cd != 'cts':
28 <td>${pgstat.score}</td>
32 % if pgstat.elo_delta is not None:
33 <td>${round(pgstat.elo_delta,2)}</td>
44 ##### SCOREBOARD HEADER #####
45 <%def name="scoreboard_header(game_type_cd, pgstat)">
46 % if game_type_cd == 'as':
49 <th class="nick">Nick</th>
51 <th class="ping">Ping</th>
53 <th class="kills">Kills</th>
54 <th class="deaths">Deaths</th>
55 <th class="suicides">Suicides</th>
56 <th class="objectives">Objectives</th>
57 <th class="score">Score</th>
65 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
68 <th class="nick">Nick</th>
70 <th class="ping">Ping</th>
72 <th class="kills">Kills</th>
73 <th class="deaths">Deaths</th>
74 <th class="suicides">Suicides</th>
75 <th class="score">Score</th>
83 % if game_type_cd == 'cq':
86 <th class="nick">Nick</th>
88 <th class="ping">Ping</th>
90 <th class="kills">Kills</th>
91 <th class="deaths">Deaths</th>
92 <th class="captured">Captured</th>
93 <th class="released">Released</th>
94 <th class="score">Score</th>
102 % if game_type_cd == 'cts':
105 <th class="nick">Nick</th>
107 <th class="ping">Ping</th>
109 <th class="fastest">Fastest Time</th>
110 <th class="deaths">Deaths</th>
115 % if game_type_cd == 'ctf':
116 <thead class="ctf ${pgstat.team_html_color()}">
118 <th class="nick">Nick</th>
120 <th class="ping">Ping</th>
122 <th class="kills">Kills</th>
123 <th class="captures">Captures</th>
124 <th class="pickups">Pickups</th>
125 <th class="fck" title="Flag Carrier Kill">FCK</th>
126 <th class="returns">Returns</th>
127 <th class="score">Score</th>
135 % if game_type_cd == 'dom':
136 <thead class="dom ${pgstat.team_html_color()}">
138 <th class="nick">Nick</th>
140 <th class="ping">Ping</th>
142 <th class="kills">Kills</th>
143 <th class="deaths">Deaths</th>
144 <th class="takes">Takes</th>
145 <th class="ticks">Ticks</th>
146 <th class="score">Score</th>
154 % if game_type_cd in 'ft' 'freezetag':
155 <thead class="freezetag ${pgstat.team_html_color()}">
157 <th class="nick">Nick</th>
159 <th class="ping">Ping</th>
161 <th class="kills">Kills</th>
162 <th class="deaths">Deaths</th>
163 <th class="revivals">Revivals</th>
164 <th class="score">Score</th>
172 % if game_type_cd in 'ka' 'keepaway':
175 <th class="nick">Nick</th>
177 <th class="ping">Ping</th>
179 <th class="kills">Kills</th>
180 <th class="deaths">Deaths</th>
181 <th class="pickups">Pickups</th>
182 <th class="bctime">BC Time</th>
183 <th class="bckills">BC Kills</th>
184 <th class="score">Score</th>
192 % if game_type_cd == 'kh':
193 <thead class="kh ${pgstat.team_html_color()}">
195 <th class="nick">Nick</th>
197 <th class="ping">Ping</th>
199 <th class="kills">Kills</th>
200 <th class="deaths">Deaths</th>
201 <th class="pickups">Pickups</th>
202 <th class="caps">Captures</th>
203 <th class="losses">Losses</th>
204 <th class="pushes">Pushes</th>
205 <th class="destroys">Destroys</th>
206 <th class="kckills">KC Kills</th>
207 <th class="score">Score</th>
215 % if game_type_cd in 'nb' 'nexball':
216 <thead class="nb ${pgstat.team_html_color()}">
218 <th class="nick">Nick</th>
220 <th class="ping">Ping</th>
222 <th class="goals">Goals</th>
223 <th class="faults">Faults</th>
224 <th class="score">Score</th>
232 % if game_type_cd == 'rc':
235 <th class="nick">Nick</th>
237 <th class="ping">Ping</th>
239 <th class="laps">Laps</th>
240 <th class="fastest">Fastest Lap</th>
241 <th class="time">Time</th>
248 ##### SCOREBOARD ROWS #####
249 <%def name="scoreboard_row(game_type_cd, pgstat)">
250 % if game_type_cd == 'as':
251 <td>${pgstat.kills}</td>
252 <td>${pgstat.deaths}</td>
253 <td>${pgstat.suicides}</td>
254 <td>${pgstat.collects}</td>
257 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
258 <td>${pgstat.kills}</td>
259 <td>${pgstat.deaths}</td>
260 <td>${pgstat.suicides}</td>
263 % if game_type_cd == 'cq':
264 <td>${pgstat.kills}</td>
265 <td>${pgstat.deaths}</td>
266 <td>${pgstat.captures}</td>
267 <td>${pgstat.drops}</td>
270 % if game_type_cd == 'cts':
271 % if pgstat.fastest is not None:
272 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
277 <td>${pgstat.deaths}</td>
280 % if game_type_cd == 'ctf':
281 <td>${pgstat.kills}</td>
282 <td>${pgstat.captures}</td>
283 <td>${pgstat.pickups}</td>
284 <td>${pgstat.carrier_frags}</td>
285 <td>${pgstat.returns}</td>
288 % if game_type_cd == 'dom':
289 <td>${pgstat.kills}</td>
290 <td>${pgstat.deaths}</td>
291 <td>${pgstat.pickups}</td>
292 <td>${pgstat.drops}</td>
295 % if game_type_cd in 'ft' 'freezetag':
296 <td>${pgstat.kills}</td>
297 <td>${pgstat.deaths}</td>
298 <td>${pgstat.revivals}</td>
301 % if game_type_cd in 'ka' 'keepaway':
302 <td>${pgstat.kills}</td>
303 <td>${pgstat.deaths}</td>
304 <td>${pgstat.pickups}</td>
306 % if pgstat.time is not None:
307 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
312 <td>${pgstat.carrier_frags}</td>
315 % if game_type_cd == 'kh':
316 <td>${pgstat.kills}</td>
317 <td>${pgstat.deaths}</td>
318 <td>${pgstat.pickups}</td>
319 <td>${pgstat.captures}</td>
320 <td>${pgstat.drops}</td>
321 <td>${pgstat.pushes}</td>
322 <td>${pgstat.destroys}</td>
323 <td>${pgstat.carrier_frags}</td>
326 % if game_type_cd in 'nb' 'nexball':
327 <td>${pgstat.captures}</td>
328 <td>${pgstat.drops}</td>
331 % if game_type_cd == 'rc':
332 <td>${pgstat.laps}</td>
334 % if pgstat.fastest is not None:
335 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
340 % if pgstat.time is not None:
341 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>