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])}
6 % for pgstat in pgstats:
7 <tr class="${pgstat.team_html_color()}">
9 % if pgstat.player_id > 2:
10 <a href="${request.route_url("player_info", id=pgstat.player_id)}"
11 title="Go to the info page for this player">
12 <span class="nick">${pgstat.nick_html_colors()|n}</span>
15 <span class="nick">${pgstat.nick_html_colors()|n}</span>
18 % if show_latency and pgstat.avg_latency is not None:
20 ${int(round(pgstat.avg_latency))}
25 ${scoreboard_row(game_type_cd, pgstat)}
26 <td>${pgstat.score}</td>
28 % if pgstat.elo_delta is not None:
29 <td>${round(pgstat.elo_delta,2)}</td>
40 ##### SCOREBOARD HEADER #####
41 <%def name="scoreboard_header(game_type_cd, pgstat)">
42 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
45 <th class="nick">Nick</th>
47 <th class="ping">Ping</th>
49 <th class="kills">Kills</th>
50 <th class="deaths">Deaths</th>
51 <th class="suicides">Suicides</th>
52 <th class="score">Score</th>
60 % if game_type_cd == 'ctf':
61 <thead class="ctf ${pgstat.team_html_color()}">
63 <th class="nick">Nick</th>
65 <th class="ping">Ping</th>
67 <th class="kills">Kills</th>
68 <th class="captures">Captures</th>
69 <th class="pickups">Pickups</th>
70 <th class="fck" title="Flag Carrier Kill">FCK</th>
71 <th class="returns">Returns</th>
72 <th class="score">Score</th>
80 % if game_type_cd == 'ca':
81 <thead class="ca ${pgstat.team_html_color()}">
83 <th class="nick">Nick</th>
85 <th class="ping">Ping</th>
87 <th class="kills">Kills</th>
88 <th class="score">Score</th>
96 % if game_type_cd == 'freezetag':
97 <thead class="freezetag ${pgstat.team_html_color()}">
99 <th class="nick">Nick</th>
101 <th class="ping">Ping</th>
103 <th class="kills">Kills</th>
104 <th class="deaths">Deaths</th>
105 <th class="suicides">Suicides</th>
106 <th class="score">Score</th>
115 ##### SCOREBOARD ROWS #####
116 <%def name="scoreboard_row(game_type_cd, pgstat)">
117 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
118 <td>${pgstat.kills}</td>
119 <td>${pgstat.deaths}</td>
120 <td>${pgstat.suicides}</td>
123 % if game_type_cd == 'ctf':
124 <td>${pgstat.kills}</td>
125 <td>${pgstat.captures}</td>
126 <td>${pgstat.pickups}</td>
127 <td>${pgstat.carrier_frags}</td>
128 <td>${pgstat.returns}</td>
131 % if game_type_cd == 'ca':
132 <td>${pgstat.kills}</td>
135 % if game_type_cd == 'freezetag':
136 <td>${pgstat.kills}</td>
137 <td>${pgstat.deaths}</td>
138 <td>${pgstat.suicides}</td>