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 == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
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 == 'ca':
99 <thead class="ca ${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="score">Score</th>
114 % if game_type_cd == 'freezetag':
115 <thead class="freezetag ${pgstat.team_html_color()}">
117 <th class="nick">Nick</th>
119 <th class="ping">Ping</th>
121 <th class="kills">Kills</th>
122 <th class="deaths">Deaths</th>
123 <th class="suicides">Suicides</th>
124 <th class="score">Score</th>
133 ##### SCOREBOARD ROWS #####
134 <%def name="scoreboard_row(game_type_cd, pgstat)">
135 % if game_type_cd == 'as':
136 <td>${pgstat.kills}</td>
137 <td>${pgstat.deaths}</td>
138 <td>${pgstat.suicides}</td>
139 <td>${pgstat.collects}</td>
142 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
143 <td>${pgstat.kills}</td>
144 <td>${pgstat.deaths}</td>
145 <td>${pgstat.suicides}</td>
148 % if game_type_cd == 'ctf':
149 <td>${pgstat.kills}</td>
150 <td>${pgstat.captures}</td>
151 <td>${pgstat.pickups}</td>
152 <td>${pgstat.carrier_frags}</td>
153 <td>${pgstat.returns}</td>
156 % if game_type_cd == 'ca':
157 <td>${pgstat.kills}</td>
160 % if game_type_cd == 'freezetag':
161 <td>${pgstat.kills}</td>
162 <td>${pgstat.deaths}</td>
163 <td>${pgstat.suicides}</td>