def nick_html_colors(self):
return html_colors(self.nick)
+ def team_html_color(self):
+ if self.team == 5:
+ return "#0000FF"
+ if self.team == 14:
+ return "#FF0000"
+ if self.team == 13:
+ return "#FFFF00"
+ if self.team == 10:
+ return "#FF00FF"
+
class GameMutator(object):
def __repr__(self):
<p>\r
<a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for ${map.name}">${map.name}</a> on <a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for ${server.name}">${server.name}</a> (<a href="${request.route_url('game_info', id=game.game_id)}" name="Permalink for game #${game.game_id}">permalink</a> for this game)\r
<table border="1" cellpadding="3">\r
- % if game.game_type_cd == 'ctf':\r
+% if game.game_type_cd == 'ctf':\r
<tr>\r
<td>Nick</td>\r
<td>Team</td>\r
${pgstat.nick_html_colors()}\r
% endif\r
</td>\r
- <td>${pgstat.team}</td>\r
+ <td style="background-color:${pgstat.team_html_color()};"></td>\r
<td>${pgstat.kills}</td>\r
<td>${pgstat.captures}</td>\r
<td>${pgstat.pickups}</td>\r