]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_info.mako
Remove <ul>s, center tables, and tweak the team colors a bit.
[xonotic/xonstat.git] / xonstat / templates / player_info.mako
1 <%inherit file="base.mako"/>
2
3 <%block name="title">
4 % if player:
5 Player Information for ${player.nick_html_colors()} - 
6 % endif
7
8 ${parent.title()}
9 </%block>
10
11
12 % if player is None:
13 <h2>This player is so good we couldn't find him!</h2>
14 <p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
15
16 % else:
17 <h2>${player.nick_html_colors()}</h2>
18 <p>
19    Joined: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} <br />
20 </p>
21 % endif
22
23 % if recent_games:
24 <h2>Recent Games</h2>
25 % for (gamestat, game, server, map) in recent_games:
26    <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>
27 <br />
28 % endfor
29 <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()}...
30 % endif
31
32
33 % if weapon_stats:
34 <h2>Accuracy</h2>
35 <table border="1" cellpadding="3" align="center">
36 <tr>
37     <td></td>
38     <td>Weapon</td>
39     <td>Hit</td>
40     <td>Fired</td>
41     <td>Hit %</td>
42     <td>Actual Damage</td>
43     <td>Potential Damage</td>
44     <td>Damage %</td>
45 </tr>
46 % for weapon_stat in weapon_stats:
47 <%
48 if weapon_stat[2] > 0: 
49     damage_pct = round(float(weapon_stat[1])/weapon_stat[2]*100, 2)
50 else:
51     damage_pct = 0
52 if weapon_stat[4] > 0: 
53     hit_pct = round(float(weapon_stat[3])/weapon_stat[4]*100, 2)
54 else:
55     hit_pct = 0
56 %>
57 <tr>
58     <td>[IMAGE]</td>
59     <td>${weapon_stat[0]}</td>
60     <td>${weapon_stat[3]}</td>
61     <td>${weapon_stat[4]}</td>
62     <td>${hit_pct}%</td>
63     <td>${weapon_stat[1]}</td>
64     <td>${weapon_stat[2]}</td>
65     <td>${damage_pct}%</td>
66 </tr>
67 % endfor
68 </table>
69
70 % endif