]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_info.mako
Applied Xonotic HTML/CSS/JS theme and worked existing HTML/CSS
[xonotic/xonstat.git] / xonstat / templates / player_info.mako
1 <%inherit file="base.mako"/>
2 <%namespace file="accuracy.mako" import="accuracy" />
3
4 <%block name="css">
5 ${parent.css()}
6 <link rel="stylesheet" href="/static/css/colorbox.css" type="text/css" media="screen" />
7 </%block>
8
9 <%block name="js">
10 ${parent.js()}
11 <script src="/static/js/jquery.colorbox-min.js"></script>
12 </%block>
13
14 <%block name="title">
15 % if player:
16 Player Information for ${player.nick_strip_colors()} - 
17 % endif
18
19 ${parent.title()}
20 </%block>
21
22
23 % if player is None:
24 <h2>This player is so good we couldn't find him!</h2>
25 <p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
26
27 % else:
28 <h2>${player.nick_html_colors()|n}</h2>
29 <p>
30    Member Since: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} <br />
31    Last Seen: ${recent_games[0][1].fuzzy_date()} <br />
32    Playing Time: ${game_stats['total_alivetime']} <br />
33    Games Played: ${game_stats['total_games_played']} <br />
34    Average Rank: ${game_stats['avg_rank']} <br />
35 </p>
36 % endif
37
38
39 ##### STATS #####
40 % if game_stats:
41 <h2>Overall Game Stats</h2>
42 <table id="player-game-stats">
43         <thead>
44                 <tr>
45                         <th>Score</th>
46                         <th>Carrier Kills</th>
47                         <th>Kills</th>
48                         <th>Collects</th>
49                         <th>Deaths</th>
50                         <th>Destroys</th>
51                         <th>Suicides</th>
52                         <th>Destroys (with key)</th>
53                         <th>Captures</th>
54                         <th>Pushes</th>
55                         <th>Pickups</th>
56                         <th>Pushed</th>
57                         <th>Drops</th>
58                         <th>Returns</th>
59                 </tr>
60         </thead>
61         <tbody>
62                 <tr>
63                         <td>${game_stats['total_score']}</td>
64                         <td>${game_stats['total_carrier_frags']}</td>
65                         <td>${game_stats['total_kills']}</td>
66                         <td>${game_stats['total_collects']}</td>
67                         <td>${game_stats['total_deaths']}</td>
68                         <td>${game_stats['total_destroys']}</td>
69                         <td>${game_stats['total_suicides']}</td>
70                         <td>${game_stats['total_destroys']}</td>
71                         <td>${game_stats['total_captures']}</td>
72                         <td>${game_stats['total_pushes']}</td>
73                         <td>${game_stats['total_pickups']}</td>
74                         <td>${game_stats['total_pushed']}</td>
75                         <td>${game_stats['total_drops']}</td>
76                         <td>${game_stats['total_returns']}</td>
77                 </tr>
78         </tbody>
79 </table>
80 % endif
81
82 ##### ACCURACY #####
83 % if weapon_stats:
84 <h2>Overall Accuracy</h2>
85 ${accuracy(weapon_stats)}
86 % endif
87
88
89 ##### RECENT GAMES (v2) ####
90 % if recent_games:
91 <h2>Recent Games</h2>
92 <table>
93         <thead>
94                 <tr>
95                    <th>Game Type</th>
96                    <th>Map</th>
97                    <th>Result</th>
98                    <th>Played</th>
99                    <th>Permalink</th>
100                 </tr>
101         </thead>
102         <tbody>
103         % for (gamestat, game, server, map) in recent_games:
104                 <tr>
105                    <td>${game.game_type_cd}</td>
106                    <td>${map.name}</td>
107                    <td>
108                    % if gamestat.team != None and gamestat.team == game.winner:
109                    Win
110                    % else:
111                    Loss
112                    % endif
113                    </td>
114                    <td>${game.fuzzy_date()}</td>
115                    <td><a class="recent_game_box" href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">View</a></td>
116                 </tr>
117         % endfor
118         </tbody>
119 </table>
120 <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()|n}...
121 % endif