# define objects for all tables
class Player(object):
+
+ def nick_html_colors(self):
+ return html_colors(self.nick)
+
def __repr__(self):
return "<Player(%s, %s, %s, %s)>" % (self.player_id, self.nick,
self.create_dt, self.location)
<%inherit file="base.mako"/>
<%block name="title">
-Player Game Index for ${player.nick} - ${parent.title()}
+Player Game Index for ${player.nick_html_colors()} - ${parent.title()}
</%block>
% if not games:
<h2>Sorry, no games yet. Get playing, scrub!</h2>
% else:
-<h2>Recent Games by ${player.nick}</h2>
+<h2>Recent Games by ${player.nick_html_colors()}</h2>
<ul>
% for (playergamestat, game, server, map) in games:
<li><a href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">#${game.game_id}:</a> <a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for ${map.name}">${map.name}</a></li>
<%block name="title">
% if player:
-Player Information for ${player.nick} -
+Player Information for ${player.nick_html_colors()} -
% endif
${parent.title()}
<p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
% else:
-<h2>${player.nick}</h2>
+<h2>${player.nick_html_colors()}</h2>
<p>
Joined: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} <br />
</p>
<li><a href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">#${game.game_id}:</a> <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></li>
% endfor
</ul>
-<a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="Game index for ${player.nick}">More games</a> played by ${player.nick}...
+<a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="Game index for ${player.nick}">More games</a> played by ${player.nick_html_colors()}...
% endif