]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_info.mako
Move the accuracy table rendering into a callable template, modify views and other...
[xonotic/xonstat.git] / xonstat / templates / player_info.mako
1 <%inherit file="base.mako"/>
2 <%namespace file="accuracy.mako" import="accuracy" />
3
4 <%block name="title">
5 % if player:
6 Player Information for ${player.nick_html_colors()} - 
7 % endif
8
9 ${parent.title()}
10 </%block>
11
12
13 % if player is None:
14 <h2>This player is so good we couldn't find him!</h2>
15 <p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
16
17 % else:
18 <h2>${player.nick_html_colors()}</h2>
19 <p>
20    Joined: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} <br />
21 </p>
22 % endif
23
24
25 ##### ACCURACY #####
26 % if weapon_stats:
27 <h2>Accuracy</h2>
28 ${accuracy(weapon_stats)}
29 % endif
30
31
32 ##### RECENT GAMES #####
33 % if recent_games:
34 <h2>Recent Games</h2>
35 % for (gamestat, game, server, map) in recent_games:
36    <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>
37 <br />
38 % endfor
39 <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()}...
40 % endif
41
42