1 <%def name="scoreboard(game_type_cd, pgstats, show_elo=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 pgstat.avg_latency is not None:
19 ${int(round(pgstat.avg_latency))}
22 ${scoreboard_row(game_type_cd, pgstat)}
23 <td>${pgstat.score}</td>
25 % if pgstat.elo_delta is not None:
26 <td>${round(pgstat.elo_delta,2)}</td>
37 ##### SCOREBOARD HEADER #####
38 <%def name="scoreboard_header(game_type_cd, pgstat)">
39 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
42 <th class="nick">Nick</th>
43 % if pgstat.avg_latency is not None:
44 <th class="ping">Ping</th>
46 <th class="kills">Kills</th>
47 <th class="deaths">Deaths</th>
48 <th class="suicides">Suicides</th>
49 <th class="score">Score</th>
57 % if game_type_cd == 'ctf':
58 <thead class="ctf ${pgstat.team_html_color()}">
60 <th class="nick">Nick</th>
61 % if pgstat.avg_latency is not None:
62 <th class="ping">Ping</th>
64 <th class="kills">Kills</th>
65 <th class="captures">Captures</th>
66 <th class="pickups">Pickups</th>
67 <th class="fck" title="Flag Carrier Kill">FCK</th>
68 <th class="returns">Returns</th>
69 <th class="score">Score</th>
77 % if game_type_cd == 'ca':
78 <thead class="ca ${pgstat.team_html_color()}">
80 <th class="nick">Nick</th>
81 % if pgstat.avg_latency is not None:
82 <th class="ping">Ping</th>
84 <th class="kills">Kills</th>
85 <th class="score">Score</th>
93 % if game_type_cd == 'freezetag':
94 <thead class="freezetag ${pgstat.team_html_color()}">
96 <th class="nick">Nick</th>
97 % if pgstat.avg_latency is not None:
98 <th class="ping">Ping</th>
100 <th class="kills">Kills</th>
101 <th class="deaths">Deaths</th>
102 <th class="suicides">Suicides</th>
103 <th class="score">Score</th>
112 ##### SCOREBOARD ROWS #####
113 <%def name="scoreboard_row(game_type_cd, pgstat)">
114 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
115 <td>${pgstat.kills}</td>
116 <td>${pgstat.deaths}</td>
117 <td>${pgstat.suicides}</td>
120 % if game_type_cd == 'ctf':
121 <td>${pgstat.kills}</td>
122 <td>${pgstat.captures}</td>
123 <td>${pgstat.pickups}</td>
124 <td>${pgstat.carrier_frags}</td>
125 <td>${pgstat.returns}</td>
128 % if game_type_cd == 'ca':
129 <td>${pgstat.kills}</td>
132 % if game_type_cd == 'freezetag':
133 <td>${pgstat.kills}</td>
134 <td>${pgstat.deaths}</td>
135 <td>${pgstat.suicides}</td>