1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
4 <%block name="navigation">
5 % if player.email_addr is not None:
6 ${nav.nav('players', True)}
8 ${nav.nav('players', False)}
14 <link href="/static/css/nv.d3.min.css" rel="stylesheet">
16 #damageChart, #accuracyChart {
24 <script type="text/javascript" src="/static/js/vendor/d3.min.js"></script>
25 <script type="text/javascript" src="/static/js/vendor/nv.d3.min.js"></script>
26 <script type="text/javascript" src="/static/js/weaponCharts.min.js"></script>
27 ##### <script src="/static/js/weaponCharts.min.js"></script>
28 <script type="text/javascript">
31 % for g in games_played:
32 $('#tab-${g.game_type_cd}').click(function() {
33 $.getJSON("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':20, 'game_type':g.game_type_cd})}", function(data) {
34 drawDamageChart("#damageChart", data);
35 drawAccuracyChart("#accuracyChart", data);
40 // weapon accuracy and damage charts
41 $.getJSON("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':20})}", function(data) {
43 if(data.games.length < 5) {
44 d3.select(".row #damageChart").remove();
45 d3.select(".row #accuracyChart").remove();
47 drawDamageChart("#damageChart", data);
48 drawAccuracyChart("#accuracyChart", data);
51 <script src="https://login.persona.org/include.js" type="text/javascript"></script>
52 <script type="text/javascript">${request.persona_js}</script>
60 <div class="small-12 columns">
62 ${player.nick_html_colors()|n}
63 % for medal in medals:
64 <img src="/static/medals/${medal.image}" alt="${medal.alt}" title="${medal.alt}" />
69 <i><span class="abstime" data-epoch="${player.epoch()}" title="${player.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">Joined ${player.fuzzy_date()}</span> (player #${player.player_id})</i>
71 <img src="/static/images/icons/24x24/cake.png" title="Happy cake day!" />
79 <div class="small-12 columns">
80 <ul class="tabs text-center" data-tab>
81 % for g in games_played:
83 % if g.game_type_cd == 'overall':
87 <a id="tab-${g.game_type_cd}" href="#tab-${g.game_type_cd}" title="${overall_stats[g.game_type_cd].game_type_descr}">
88 <span class="sprite sprite-${g.game_type_cd}"></span><br />
89 ${g.game_type_cd} <br />
90 <small>(${g.games})</small>
98 <div class="tabs-content">
99 % for g in games_played:
101 % if g.game_type_cd == 'overall':
104 " id="tab-${g.game_type_cd}">
106 ##### LEFT PANE #####
107 <div class="small-12 medium-6 columns">
109 % if g.game_type_cd in overall_stats:
110 Last Played: <small><span class="abstime" data-epoch="${overall_stats[g.game_type_cd].last_played_epoch}" title="${overall_stats[g.game_type_cd].last_played.strftime('%a, %d %b %Y %H:%M:%S UTC')}"> ${overall_stats[g.game_type_cd].last_played_fuzzy} </span> <br /></small>
112 <small><br /></small>
116 % if g.game_type_cd == 'overall':
117 <small><a href="${request.route_url("player_game_index", player_id=player.player_id)}" title="View recent games">
119 <small><a href="${request.route_url("player_game_index", player_id=player.player_id, _query={'type':g.game_type_cd})}" title="View recent ${overall_stats[g.game_type_cd].game_type_descr} games">
121 ${g.games}</a> <br /></small>
123 Playing Time: <small>${overall_stats[g.game_type_cd].total_playing_time} <br /></small>
125 % if g.game_type_cd in fav_maps:
126 Favorite Map: <small><a href="${request.route_url("map_info", id=fav_maps[g.game_type_cd].map_id)}" title="Go to the detail page for this map">${fav_maps[g.game_type_cd].map_name}</a> <br /></small>
128 <small><br /></small>
131 % if g.game_type_cd == 'ctf':
132 % if overall_stats[g.game_type_cd].total_captures is not None:
133 <small><a href="${request.route_url("player_captimes", player_id=player.player_id)}">Fastest flag captures...</a> <br /></small>
135 <small><br /></small>
138 <small><br /></small>
143 ##### RIGHT PANE #####
144 <div class="small-12 medium-6 columns">
146 Win Percentage: <small>${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses) <br /></small>
148 % if g.game_type_cd in overall_stats:
149 % if overall_stats[g.game_type_cd].k_d_ratio is not None:
150 Kill Ratio: <small>${round(overall_stats[g.game_type_cd].k_d_ratio,2)} (${overall_stats[g.game_type_cd].total_kills} kills, ${overall_stats[g.game_type_cd].total_deaths} deaths) <br /></small>
153 <small><br /></small>
156 % if g.game_type_cd in elos:
157 % if g.game_type_cd == 'overall':
158 Best Elo: <small>${round(elos[g.game_type_cd].elo,2)} (${elos[g.game_type_cd].game_type_cd}, ${elos[g.game_type_cd].games} games) <br /></small>
160 Elo: <small>${round(elos[g.game_type_cd].elo,2)} (${elos[g.game_type_cd].games} games) <br /></small>
163 <small><br /></small>
166 % if g.game_type_cd in ranks:
167 % if g.game_type_cd == 'overall':
170 <a href="${request.route_url('rank_index', game_type_cd=ranks[g.game_type_cd].game_type_cd, _query={'page':(ranks[g.game_type_cd].rank-1)/20+1})}" title="Player rank page for this player">
171 ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank}
173 (${ranks[g.game_type_cd].game_type_cd}, percentile: ${round(ranks[g.game_type_cd].percentile,2)})
179 <a href="${request.route_url('rank_index', game_type_cd=g.game_type_cd, _query={'page':(ranks[g.game_type_cd].rank-1)/20+1})}" title="Player rank page for this player">
180 ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank}
182 (percentile: ${round(ranks[g.game_type_cd].percentile,2)})
187 <small><br /></small>
190 % if g.game_type_cd == 'ctf':
191 % if overall_stats[g.game_type_cd].cap_ratio is not None:
192 Cap Ratio: <small>${round(overall_stats[g.game_type_cd].cap_ratio,2)} (${overall_stats[g.game_type_cd].total_captures} captures, ${overall_stats[g.game_type_cd].total_pickups} pickups) <br /></small>
194 <small><br /></small>
197 <small><br /></small>
205 ##### ACCURACY CHART ####
206 <div class="row" id="accuracyChartRow">
207 <div class="small-12 columns">
208 <h5>Weapon Accuracy</h5>
210 Sorry, but you've disabled JavaScript! It is required to draw the accuracy chart.
212 <div id="accuracyChart">
213 <svg id="accuracyChartSVG"></svg>
218 ##### DAMAGE CHART ####
219 <div class="row" id="damageChartRow">
220 <div class="small-12 columns">
221 <h5>Weapon Damage</h5>
223 Sorry, but you've disabled JavaScript! It is required to draw the damage chart.
225 <div id="damageChart">
226 <svg id="damageChartSVG"></svg>
231 ##### RECENT GAMES (v2) ####
234 <div class="small-12 columns">
235 <h5>Recent Games <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="Game index for ${player.stripped_nick}"><i class="fa fa-plus-circle"></i></a></h5>
236 <table class="table-hover table-condensed">
239 <th class="small-1 text-center"></th>
240 <th class="small-1">Type</th>
241 <th class="show-for-medium-up small-3">Server</th>
242 <th class="small-2">Map</th>
243 <th class="show-for-medium-up small-1">Result</th>
244 <th class="show-for-medium-up small-2">Played</th>
245 <th class="small-1">Elo</th>
249 % for rg in recent_games:
251 <td class="text-center"><a class="tiny button" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
252 <td class="text-center"><span class="sprite sprite-${rg.game_type_cd}" alt="${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
253 <td class="show-for-medium-up no-stretch"><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
254 <td class="no-stretch"><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the detail page for this map">${rg.map_name}</a></td>
255 <td class="show-for-medium-up">
256 % if rg.team != None:
257 % if rg.team == rg.winner:
270 <td class="show-for-medium-up"><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
271 <td class="text-center">
272 <a href="${request.route_url('game_info', id=rg.game_id, _query={'show_elo':1})}" title="View detailed information about this game">
273 % if rg.elo_delta is not None:
274 % if round(rg.elo_delta,2) > 0:
275 <span class="eloup">+${round(rg.elo_delta,2)}</span>
276 % elif round(rg.elo_delta,2) < 0:
277 <span class="elodown">${round(rg.elo_delta,2)}</span>
279 <span class="eloneutral"><i class="fa fa-minus"></i></span>
282 <span class="eloneutral"><i class="fa fa-minus"></i></span>