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 % if show_latency and pgstat.avg_latency is not None:
9 ${int(round(pgstat.avg_latency))}
12 <td class="tdcenter">-</td>
15 <td class="player-nick">
16 % if pgstat.player_id > 2:
17 <a href="${request.route_url("player_info", id=pgstat.player_id)}"
18 title="Go to the info page for this player">
19 <span class="nick">${pgstat.nick_html_colors()|n}</span>
22 <span class="nick">${pgstat.nick_html_colors()|n}</span>
26 ${scoreboard_row(game_type_cd, pgstat)}
28 % if game_type_cd != 'cts':
29 <td class="player-score">${pgstat.score}</td>
33 % if pgstat.elo_delta is not None:
34 <td>${round(pgstat.elo_delta,2)}</td>
45 ##### SCOREBOARD HEADER #####
46 <%def name="scoreboard_header(game_type_cd, pgstat)">
47 % if game_type_cd == 'as':
51 <th class="ping">Ping</th>
53 <th class="nick">Nick</th>
54 <th class="kills">Kills</th>
55 <th class="deaths">Deaths</th>
56 <th class="suicides">Suicides</th>
57 <th class="objectives">Objectives</th>
58 <th class="score">Score</th>
66 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
70 <th class="ping">Ping</th>
72 <th class="nick">Nick</th>
73 <th class="kills">Kills</th>
74 <th class="deaths">Deaths</th>
75 <th class="suicides">Suicides</th>
76 <th class="score">Score</th>
84 % if game_type_cd == 'cq':
88 <th class="ping">Ping</th>
90 <th class="nick">Nick</th>
91 <th class="kills">Kills</th>
92 <th class="deaths">Deaths</th>
93 <th class="captured">Captured</th>
94 <th class="released">Released</th>
95 <th class="score">Score</th>
103 % if game_type_cd == 'cts':
107 <th class="ping">Ping</th>
109 <th class="nick">Nick</th>
110 <th class="fastest">Fastest Time</th>
111 <th class="deaths">Deaths</th>
116 % if game_type_cd == 'ctf':
117 <thead class="ctf ${pgstat.team_html_color()}">
120 <th class="ping">Ping</th>
122 <th class="nick">Nick</th>
123 <th class="kills">Kills</th>
124 <th class="captures">Captures</th>
125 <th class="pickups">Pickups</th>
126 <th class="fck" title="Flag Carrier Kill">FCK</th>
127 <th class="returns">Returns</th>
128 <th class="score">Score</th>
136 % if game_type_cd == 'dom':
137 <thead class="dom ${pgstat.team_html_color()}">
140 <th class="ping">Ping</th>
142 <th class="nick">Nick</th>
143 <th class="kills">Kills</th>
144 <th class="deaths">Deaths</th>
145 <th class="takes">Takes</th>
146 <th class="ticks">Ticks</th>
147 <th class="score">Score</th>
155 % if game_type_cd in 'ft' 'freezetag':
156 <thead class="freezetag ${pgstat.team_html_color()}">
159 <th class="ping">Ping</th>
161 <th class="nick">Nick</th>
162 <th class="kills">Kills</th>
163 <th class="deaths">Deaths</th>
164 <th class="revivals">Revivals</th>
165 <th class="score">Score</th>
173 % if game_type_cd in 'ka' 'keepaway':
177 <th class="ping">Ping</th>
179 <th class="nick">Nick</th>
180 <th class="kills">Kills</th>
181 <th class="deaths">Deaths</th>
182 <th class="pickups">Pickups</th>
183 <th class="bctime">BC Time</th>
184 <th class="bckills">BC Kills</th>
185 <th class="score">Score</th>
193 % if game_type_cd == 'kh':
194 <thead class="kh ${pgstat.team_html_color()}">
197 <th class="ping">Ping</th>
199 <th class="nick">Nick</th>
200 <th class="kills">Kills</th>
201 <th class="deaths">Deaths</th>
202 <th class="pickups">Pickups</th>
203 <th class="caps">Captures</th>
204 <th class="losses">Losses</th>
205 <th class="pushes">Pushes</th>
206 <th class="destroys">Destroys</th>
207 <th class="kckills">KC Kills</th>
208 <th class="score">Score</th>
216 % if game_type_cd in 'nb' 'nexball':
217 <thead class="nb ${pgstat.team_html_color()}">
220 <th class="ping">Ping</th>
222 <th class="nick">Nick</th>
223 <th class="goals">Goals</th>
224 <th class="faults">Faults</th>
225 <th class="score">Score</th>
233 % if game_type_cd == 'rc':
237 <th class="ping">Ping</th>
239 <th class="nick">Nick</th>
240 <th class="laps">Laps</th>
241 <th class="fastest">Fastest Lap</th>
242 <th class="time">Time</th>
249 ##### SCOREBOARD ROWS #####
250 <%def name="scoreboard_row(game_type_cd, pgstat)">
251 % if game_type_cd == 'as':
252 <td>${pgstat.kills}</td>
253 <td>${pgstat.deaths}</td>
254 <td>${pgstat.suicides}</td>
255 <td>${pgstat.collects}</td>
258 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
259 <td>${pgstat.kills}</td>
260 <td>${pgstat.deaths}</td>
261 <td>${pgstat.suicides}</td>
264 % if game_type_cd == 'cq':
265 <td>${pgstat.kills}</td>
266 <td>${pgstat.deaths}</td>
267 <td>${pgstat.captures}</td>
268 <td>${pgstat.drops}</td>
271 % if game_type_cd == 'cts':
272 % if pgstat.fastest is not None:
273 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
278 <td>${pgstat.deaths}</td>
281 % if game_type_cd == 'ctf':
282 <td>${pgstat.kills}</td>
283 <td>${pgstat.captures}</td>
284 <td>${pgstat.pickups}</td>
285 <td>${pgstat.carrier_frags}</td>
286 <td>${pgstat.returns}</td>
289 % if game_type_cd == 'dom':
290 <td>${pgstat.kills}</td>
291 <td>${pgstat.deaths}</td>
292 <td>${pgstat.pickups}</td>
293 <td>${pgstat.drops}</td>
296 % if game_type_cd in 'ft' 'freezetag':
297 <td>${pgstat.kills}</td>
298 <td>${pgstat.deaths}</td>
299 <td>${pgstat.revivals}</td>
302 % if game_type_cd in 'ka' 'keepaway':
303 <td>${pgstat.kills}</td>
304 <td>${pgstat.deaths}</td>
305 <td>${pgstat.pickups}</td>
307 % if pgstat.time is not None:
308 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
313 <td>${pgstat.carrier_frags}</td>
316 % if game_type_cd == 'kh':
317 <td>${pgstat.kills}</td>
318 <td>${pgstat.deaths}</td>
319 <td>${pgstat.pickups}</td>
320 <td>${pgstat.captures}</td>
321 <td>${pgstat.drops}</td>
322 <td>${pgstat.pushes}</td>
323 <td>${pgstat.destroys}</td>
324 <td>${pgstat.carrier_frags}</td>
327 % if game_type_cd in 'nb' 'nexball':
328 <td>${pgstat.captures}</td>
329 <td>${pgstat.drops}</td>
332 % if game_type_cd == 'rc':
333 <td>${pgstat.laps}</td>
335 % if pgstat.fastest is not None:
336 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
341 % if pgstat.time is not None:
342 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>