1 <%def name="scoreboard(game_type_cd, pgstats)">
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>
30 ##### SCOREBOARD HEADER #####
31 <%def name="scoreboard_header(game_type_cd, pgstat)">
32 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
35 <th class="nick">Nick</th>
36 % if pgstat.avg_latency is not None:
37 <th class="ping">Ping</th>
39 <th class="kills">Kills</th>
40 <th class="deaths">Deaths</th>
41 <th class="suicides">Suicides</th>
42 <th class="score">Score</th>
47 % if game_type_cd == 'ctf':
48 <thead class="ctf ${pgstat.team_html_color()}">
50 <th class="nick">Nick</th>
51 % if pgstat.avg_latency is not None:
52 <th class="ping">Ping</th>
54 <th class="kills">Kills</th>
55 <th class="captures">Captures</th>
56 <th class="pickups">Pickups</th>
57 <th class="fck" title="Flag Carrier Kill">FCK</th>
58 <th class="returns">Returns</th>
59 <th class="score">Score</th>
64 % if game_type_cd == 'ca':
65 <thead class="ca ${pgstat.team_html_color()}">
67 <th class="nick">Nick</th>
68 % if pgstat.avg_latency is not None:
69 <th class="ping">Ping</th>
71 <th class="kills">Kills</th>
72 <th class="score">Score</th>
77 % if game_type_cd == 'freezetag':
78 <thead class="freezetag ${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="deaths">Deaths</th>
86 <th class="suicides">Suicides</th>
87 <th class="score">Score</th>
93 ##### SCOREBOARD ROWS #####
94 <%def name="scoreboard_row(game_type_cd, pgstat)">
95 % if game_type_cd == 'dm' or game_type_cd == 'tdm' or game_type_cd == 'duel':
96 <td>${pgstat.kills}</td>
97 <td>${pgstat.deaths}</td>
98 <td>${pgstat.suicides}</td>
101 % if game_type_cd == 'ctf':
102 <td>${pgstat.kills}</td>
103 <td>${pgstat.captures}</td>
104 <td>${pgstat.pickups}</td>
105 <td>${pgstat.carrier_frags}</td>
106 <td>${pgstat.returns}</td>
109 % if game_type_cd == 'ca':
110 <td>${pgstat.kills}</td>
113 % if game_type_cd == 'freezetag':
114 <td>${pgstat.kills}</td>
115 <td>${pgstat.deaths}</td>
116 <td>${pgstat.suicides}</td>