1 <%def name="scoreboard(game_type_cd, pgstats, show_elo=False, show_latency=False)">
3 <table class="table table-condensed">
5 <td class="teamscore" colspan="${len(teamscores)}">Teamscores</td>
7 <tbody><tr class="teamscores">
8 % for team,score in sorted(teamscores.items(), key=lambda x:x[1], reverse=True):
9 <td class="${team}">${score}</td>
14 <table class="table table-hover table-condensed">
15 ${scoreboard_header(game_type_cd, pgstats[0])}
17 % for pgstat in pgstats:
18 <tr class="${pgstat.team_html_color()}">
19 <td class="player-nick">
20 % if pgstat.player_id > 2:
21 <a href="${request.route_url("player_info", id=pgstat.player_id)}"
22 title="Go to the info page for this player">
23 <span class="nick">${pgstat.nick_html_colors()|n}</span>
26 <span class="nick">${pgstat.nick_html_colors()|n}</span>
29 % if show_latency and pgstat.avg_latency is not None:
31 ${int(round(pgstat.avg_latency))}
36 ${scoreboard_row(game_type_cd, pgstat)}
37 % if game_type_cd != 'cts':
38 <td>${pgstat.score}</td>
41 % if pgstat.elo_delta is not None:
42 <td>${round(pgstat.elo_delta,2)}</td>
53 ##### SCOREBOARD HEADER #####
54 <%def name="scoreboard_header(game_type_cd, pgstat)">
55 % if game_type_cd == 'as':
58 <th class="nick">Nick</th>
60 <th class="ping">Ping</th>
62 <th class="kills">Kills</th>
63 <th class="deaths">Deaths</th>
64 <th class="suicides">Suicides</th>
65 <th class="objectives">Objectives</th>
66 <th class="score">Score</th>
74 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
77 <th class="nick">Nick</th>
79 <th class="ping">Ping</th>
81 <th class="kills">Kills</th>
82 <th class="deaths">Deaths</th>
83 <th class="suicides">Suicides</th>
84 <th class="score">Score</th>
92 % if game_type_cd == 'cq':
95 <th class="nick">Nick</th>
97 <th class="ping">Ping</th>
99 <th class="kills">Kills</th>
100 <th class="deaths">Deaths</th>
101 <th class="captured">Captured</th>
102 <th class="released">Released</th>
103 <th class="score">Score</th>
111 % if game_type_cd == 'cts':
114 <th class="nick">Nick</th>
116 <th class="ping">Ping</th>
118 <th class="fastest">Fastest Time</th>
119 <th class="deaths">Deaths</th>
124 % if game_type_cd == 'ctf':
125 <thead class="ctf ${pgstat.team_html_color()}">
127 <th class="nick">Nick</th>
129 <th class="ping">Ping</th>
131 <th class="kills">Kills</th>
132 <th class="captures">Captures</th>
133 <th class="pickups">Pickups</th>
134 <th class="fck" title="Flag Carrier Kill">FCK</th>
135 <th class="returns">Returns</th>
136 <th class="score">Score</th>
144 % if game_type_cd == 'dom':
145 <thead class="dom ${pgstat.team_html_color()}">
147 <th class="nick">Nick</th>
149 <th class="ping">Ping</th>
151 <th class="kills">Kills</th>
152 <th class="deaths">Deaths</th>
153 <th class="takes">Takes</th>
154 <th class="ticks">Ticks</th>
155 <th class="score">Score</th>
163 % if game_type_cd in 'ft' 'freezetag':
164 <thead class="freezetag ${pgstat.team_html_color()}">
166 <th class="nick">Nick</th>
168 <th class="ping">Ping</th>
170 <th class="kills">Kills</th>
171 <th class="deaths">Deaths</th>
172 <th class="revivals">Revivals</th>
173 <th class="score">Score</th>
181 % if game_type_cd in 'ka' 'keepaway':
184 <th class="nick">Nick</th>
186 <th class="ping">Ping</th>
188 <th class="kills">Kills</th>
189 <th class="deaths">Deaths</th>
190 <th class="pickups">Pickups</th>
191 <th class="bctime">BC Time</th>
192 <th class="bckills">BC Kills</th>
200 % if game_type_cd == 'kh':
201 <thead class="kh ${pgstat.team_html_color()}">
203 <th class="nick">Nick</th>
205 <th class="ping">Ping</th>
207 <th class="kills">Kills</th>
208 <th class="deaths">Deaths</th>
209 <th class="pickups">Pickups</th>
210 <th class="caps">Captures</th>
211 <th class="losses">Losses</th>
212 <th class="pushes">Pushes</th>
213 <th class="destroys">Destroys</th>
214 <th class="kckills">KC Kills</th>
215 <th class="score">Score</th>
223 % if game_type_cd in 'nb' 'nexball':
224 <thead class="nb ${pgstat.team_html_color()}">
226 <th class="nick">Nick</th>
228 <th class="ping">Ping</th>
230 <th class="goals">Goals</th>
231 <th class="faults">Faults</th>
232 <th class="score">Score</th>
240 % if game_type_cd == 'rc':
243 <th class="nick">Nick</th>
245 <th class="ping">Ping</th>
247 <th class="laps">Laps</th>
248 <th class="fastest">Fastest Lap</th>
249 <th class="time">Time</th>
256 ##### SCOREBOARD ROWS #####
257 <%def name="scoreboard_row(game_type_cd, pgstat)">
258 % if game_type_cd == 'as':
259 <td>${pgstat.kills}</td>
260 <td>${pgstat.deaths}</td>
261 <td>${pgstat.suicides}</td>
262 <td>${pgstat.collects}</td>
265 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
266 <td>${pgstat.kills}</td>
267 <td>${pgstat.deaths}</td>
268 <td>${pgstat.suicides}</td>
271 % if game_type_cd == 'cq':
272 <td>${pgstat.kills}</td>
273 <td>${pgstat.deaths}</td>
274 <td>${pgstat.captures}</td>
275 <td>${pgstat.drops}</td>
278 % if game_type_cd == 'cts':
279 % if pgstat.fastest is not None:
280 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
284 <td>${pgstat.deaths}</td>
287 % if game_type_cd == 'ctf':
288 <td>${pgstat.kills}</td>
289 <td>${pgstat.captures}</td>
290 <td>${pgstat.pickups}</td>
291 <td>${pgstat.carrier_frags}</td>
292 <td>${pgstat.returns}</td>
295 % if game_type_cd == 'dom':
296 <td>${pgstat.kills}</td>
297 <td>${pgstat.deaths}</td>
298 <td>${pgstat.pickups}</td>
299 <td>${pgstat.drops}</td>
302 % if game_type_cd in 'ft' 'freezetag':
303 <td>${pgstat.kills}</td>
304 <td>${pgstat.deaths}</td>
305 <td>${pgstat.revivals}</td>
308 % if game_type_cd in 'ka' 'keepaway':
309 <td>${pgstat.kills}</td>
310 <td>${pgstat.deaths}</td>
311 <td>${pgstat.pickups}</td>
313 % if pgstat.time is not None:
314 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
319 <td>${pgstat.fckills}</td>
322 % if game_type_cd == 'kh':
323 <td>${pgstat.kills}</td>
324 <td>${pgstat.deaths}</td>
325 <td>${pgstat.pickups}</td>
326 <td>${pgstat.captures}</td>
327 <td>${pgstat.drops}</td>
328 <td>${pgstat.pushes}</td>
329 <td>${pgstat.destroys}</td>
330 <td>${pgstat.carrier_frags}</td>
333 % if game_type_cd in 'nb' 'nexball':
334 <td>${pgstat.captures}</td>
335 <td>${pgstat.drops}</td>
338 % if game_type_cd == 'rc':
339 <td>${pgstat.laps}</td>
341 % if pgstat.fastest is not None:
342 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
347 % if pgstat.time is not None:
348 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>