1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="accuracy.mako" import="accuracy" />
5 <%block name="navigation">
10 <script src="/static/js/jquery-1.7.1.min.js"></script>
11 <script src="/static/js/jquery.flot.min.js"></script>
12 <script type="text/javascript">
15 function plot_acc_graph(data) {
16 var games = new Array();
17 var avgs = new Array();
18 var accs = new Array();
21 for(i=0; i < data.games; i++) {
22 avgs[i] = [i, data.avg];
23 accs[i] = [i, data.accs[i][1]];
24 games[i] = [i, data.accs[i][0]];
29 [ { data: avgs }, { data: accs }, ],
30 { yaxis: {ticks: 10, min: 0, max: 100 },
35 url: '${request.route_url("player_accuracy", id=player.player_id)}',
38 success: plot_acc_graph
41 $(".acc-weap").click(function () {
42 var dataurl = $(this).find('a').attr('href');
44 $('.weapon-active').removeClass('weapon-active');
45 $(this).addClass('weapon-active');
51 success: plot_acc_graph
64 <h2>This player is so good we couldn't find him!</h2>
65 <p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
70 <h2>${player.nick_html_colors()|n}</h2>
72 Member Since: <small>${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} </small><br />
73 Last Seen: <small>${recent_games[0][1].fuzzy_date()} </small><br />
74 Playing Time: <small>${total_stats['alivetime']} </small><br />
75 % if total_games > 0 and total_stats['wins'] is not None:
76 Win Percentage: <small>${round(float(total_stats['wins'])/total_games * 100, 2)}% (${total_stats['wins']} wins, ${total_games - total_stats['wins']} losses) </small><br />
78 % if total_stats['kills'] > 0 and total_stats['deaths'] > 0:
79 Kill Ratio: <small>${round(float(total_stats['kills'])/total_stats['deaths'], 3)} (${total_stats['kills']} kills, ${total_stats['deaths']} deaths) </small><br />
81 <% games_breakdown_str = ', '.join(["{0} {1}".format(ng, gt) for (gt, ng) in games_breakdown]) %>
82 Games Played: <small>${total_games} (${games_breakdown_str})</small><br />
83 % if elos_display is not None and len(elos_display) > 0:
85 <small>${', '.join(elos_display)} </small>
87 %if '*' in ', '.join(elos_display):
88 <small><i>*preliminary Elo</i></small>
97 % if accs is not None:
101 <div id="acc-graph" style="width:800px; height:200px;">
104 <div class="weapon-nav">
106 % if 'nex' in recent_weapons:
108 <div class="acc-weap weapon-active">
109 <img src="${request.static_url("xonstat:static/images/nex.png")}" />
110 <p><small>Nex</small></p>
111 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'nex'})}" title="Show nex accuracy"></a>
116 % if 'rifle' in recent_weapons:
118 <div class="acc-weap">
119 <img src="${request.static_url("xonstat:static/images/rifle.png")}" />
120 <p><small>Rifle</small></p>
121 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'rifle'})}" title="Show rifle accuracy"></a>
126 % if 'minstanex' in recent_weapons:
128 <div class="acc-weap">
129 <img src="${request.static_url("xonstat:static/images/minstanex.png")}" />
130 <p><small>Minstanex</small></p>
131 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'minstanex'})}" title="Show minstanex accuracy"></a>
136 % if 'uzi' in recent_weapons:
138 <div class="acc-weap">
139 <img src="${request.static_url("xonstat:static/images/uzi.png")}" />
140 <p><small>Uzi</small></p>
141 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'uzi'})}" title="Show uzi accuracy"></a>
146 % if 'shotgun' in recent_weapons:
148 <div class="acc-weap">
149 <img src="${request.static_url("xonstat:static/images/shotgun.png")}" />
150 <p><small>Shotgun</small></p>
151 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'shotgun'})}" title="Show shotgun accuracy"></a>
163 ##### RECENT GAMES (v2) ####
167 <h3>Recent Games</h3>
168 <table class="table table-bordered table-condensed">
180 % for (gamestat, game, server, map) in recent_games:
182 <td><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">view</a></td>
183 <td style="width:20px;"><img title="${game.game_type_cd}" src="/static/images/icons/24x24/${game.game_type_cd}.png" alt="${game.game_type_cd}" /></td>
184 <td>${server.name}</td>
187 % if gamestat.team != None:
188 % if gamestat.team == game.winner:
194 % if gamestat.rank == 1:
197 Loss (#${gamestat.rank})
201 <td>${game.fuzzy_date()}</td>
206 % if total_games > 10:
207 <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="Game index for ${player.nick}">More games played by ${player.nick_html_colors()|n}...</a>