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))}
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>
107 <th class="deaths">Deaths</th>
112 % if game_type_cd == 'ctf':
113 <thead class="ctf ${pgstat.team_html_color()}">
115 <th class="nick">Nick</th>
117 <th class="ping">Ping</th>
119 <th class="kills">Kills</th>
120 <th class="captures">Captures</th>
121 <th class="pickups">Pickups</th>
122 <th class="fck" title="Flag Carrier Kill">FCK</th>
123 <th class="returns">Returns</th>
124 <th class="score">Score</th>
132 % if game_type_cd == 'dom':
133 <thead class="dom ${pgstat.team_html_color()}">
135 <th class="nick">Nick</th>
137 <th class="ping">Ping</th>
139 <th class="kills">Kills</th>
140 <th class="deaths">Deaths</th>
141 <th class="takes">Takes</th>
142 <th class="ticks">Ticks</th>
143 <th class="score">Score</th>
151 % if game_type_cd in 'ft' 'freezetag':
152 <thead class="freezetag ${pgstat.team_html_color()}">
154 <th class="nick">Nick</th>
156 <th class="ping">Ping</th>
158 <th class="kills">Kills</th>
159 <th class="deaths">Deaths</th>
160 <th class="revivals">Revivals</th>
161 <th class="score">Score</th>
169 % if game_type_cd in 'ka' 'keepaway':
172 <th class="nick">Nick</th>
174 <th class="ping">Ping</th>
176 <th class="kills">Kills</th>
177 <th class="deaths">Deaths</th>
178 <th class="pickups">Pickups</th>
179 <th class="bctime">BC Time</th>
180 <th class="bckills">BC Kills</th>
188 % if game_type_cd == 'kh':
189 <thead class="kh ${pgstat.team_html_color()}">
191 <th class="nick">Nick</th>
193 <th class="ping">Ping</th>
195 <th class="kills">Kills</th>
196 <th class="deaths">Deaths</th>
197 <th class="pickups">Pickups</th>
198 <th class="caps">Captures</th>
199 <th class="losses">Losses</th>
200 <th class="pushes">Pushes</th>
201 <th class="destroys">Destroys</th>
202 <th class="kckills">KC Kills</th>
203 <th class="score">Score</th>
211 % if game_type_cd in 'nb' 'nexball':
212 <thead class="nb ${pgstat.team_html_color()}">
214 <th class="nick">Nick</th>
216 <th class="ping">Ping</th>
218 <th class="goals">Goals</th>
219 <th class="faults">Faults</th>
220 <th class="score">Score</th>
228 % if game_type_cd == 'rc':
231 <th class="nick">Nick</th>
233 <th class="ping">Ping</th>
235 <th class="laps">Laps</th>
236 <th class="fastest">Fastest Lap</th>
237 <th class="time">Time</th>
244 ##### SCOREBOARD ROWS #####
245 <%def name="scoreboard_row(game_type_cd, pgstat)">
246 % if game_type_cd == 'as':
247 <td>${pgstat.kills}</td>
248 <td>${pgstat.deaths}</td>
249 <td>${pgstat.suicides}</td>
250 <td>${pgstat.collects}</td>
253 % if game_type_cd in 'ca' 'dm' 'duel' 'rune' 'tdm':
254 <td>${pgstat.kills}</td>
255 <td>${pgstat.deaths}</td>
256 <td>${pgstat.suicides}</td>
259 % if game_type_cd == 'cq':
260 <td>${pgstat.kills}</td>
261 <td>${pgstat.deaths}</td>
262 <td>${pgstat.captures}</td>
263 <td>${pgstat.drops}</td>
266 % if game_type_cd == 'cts':
267 % if pgstat.fastest is not None:
268 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
272 <td>${pgstat.deaths}</td>
275 % if game_type_cd == 'ctf':
276 <td>${pgstat.kills}</td>
277 <td>${pgstat.captures}</td>
278 <td>${pgstat.pickups}</td>
279 <td>${pgstat.carrier_frags}</td>
280 <td>${pgstat.returns}</td>
283 % if game_type_cd == 'dom':
284 <td>${pgstat.kills}</td>
285 <td>${pgstat.deaths}</td>
286 <td>${pgstat.pickups}</td>
287 <td>${pgstat.drops}</td>
290 % if game_type_cd in 'ft' 'freezetag':
291 <td>${pgstat.kills}</td>
292 <td>${pgstat.deaths}</td>
293 <td>${pgstat.revivals}</td>
296 % if game_type_cd in 'ka' 'keepaway':
297 <td>${pgstat.kills}</td>
298 <td>${pgstat.deaths}</td>
299 <td>${pgstat.pickups}</td>
301 % if pgstat.time is not None:
302 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>
307 <td>${pgstat.fckills}</td>
310 % if game_type_cd == 'kh':
311 <td>${pgstat.kills}</td>
312 <td>${pgstat.deaths}</td>
313 <td>${pgstat.pickups}</td>
314 <td>${pgstat.captures}</td>
315 <td>${pgstat.drops}</td>
316 <td>${pgstat.pushes}</td>
317 <td>${pgstat.destroys}</td>
318 <td>${pgstat.carrier_frags}</td>
321 % if game_type_cd in 'nb' 'nexball':
322 <td>${pgstat.captures}</td>
323 <td>${pgstat.drops}</td>
326 % if game_type_cd == 'rc':
327 <td>${pgstat.laps}</td>
329 % if pgstat.fastest is not None:
330 <td>${round(float(pgstat.fastest.seconds) + (pgstat.fastest.microseconds/1000000.0), 2)}</td>
335 % if pgstat.time is not None:
336 <td>${round(float(pgstat.time.seconds) + (pgstat.time.microseconds/1000000.0), 2)}</td>