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 <td>${pgstat.score}</td>
27 % if pgstat.elo_delta is not None:
28 <td>${round(pgstat.elo_delta,2)}</td>
39 ##### SCOREBOARD HEADER #####
40 <%def name="scoreboard_header(game_type_cd, pgstat)">
41 % if game_type_cd == 'as':
44 <th class="nick">Nick</th>
46 <th class="ping">Ping</th>
48 <th class="kills">Kills</th>
49 <th class="deaths">Deaths</th>
50 <th class="suicides">Suicides</th>
51 <th class="objectives">Objectives</th>
52 <th class="score">Score</th>
60 % if game_type_cd in 'ca' 'dm' 'duel' 'tdm':
63 <th class="nick">Nick</th>
65 <th class="ping">Ping</th>
67 <th class="kills">Kills</th>
68 <th class="deaths">Deaths</th>
69 <th class="suicides">Suicides</th>
70 <th class="score">Score</th>
78 % if game_type_cd == 'ctf':
79 <thead class="ctf ${pgstat.team_html_color()}">
81 <th class="nick">Nick</th>
83 <th class="ping">Ping</th>
85 <th class="kills">Kills</th>
86 <th class="captures">Captures</th>
87 <th class="pickups">Pickups</th>
88 <th class="fck" title="Flag Carrier Kill">FCK</th>
89 <th class="returns">Returns</th>
90 <th class="score">Score</th>
98 % if game_type_cd == 'freezetag':
99 <thead class="freezetag ${pgstat.team_html_color()}">
101 <th class="nick">Nick</th>
103 <th class="ping">Ping</th>
105 <th class="kills">Kills</th>
106 <th class="deaths">Deaths</th>
107 <th class="suicides">Suicides</th>
108 <th class="score">Score</th>
117 ##### SCOREBOARD ROWS #####
118 <%def name="scoreboard_row(game_type_cd, pgstat)">
119 % if game_type_cd == 'as':
120 <td>${pgstat.kills}</td>
121 <td>${pgstat.deaths}</td>
122 <td>${pgstat.suicides}</td>
123 <td>${pgstat.collects}</td>
126 % if game_type_cd in 'ca' 'dm' 'duel' 'tdm':
127 <td>${pgstat.kills}</td>
128 <td>${pgstat.deaths}</td>
129 <td>${pgstat.suicides}</td>
132 % if game_type_cd == 'ctf':
133 <td>${pgstat.kills}</td>
134 <td>${pgstat.captures}</td>
135 <td>${pgstat.pickups}</td>
136 <td>${pgstat.carrier_frags}</td>
137 <td>${pgstat.returns}</td>
140 % if game_type_cd == 'freezetag':
141 <td>${pgstat.kills}</td>
142 <td>${pgstat.deaths}</td>
143 <td>${pgstat.suicides}</td>