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');
48 success: plot_acc_graph
61 <h2>This player is so good we couldn't find him!</h2>
62 <p>Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!</p>
67 <h2>${player.nick_html_colors()|n}</h2>
69 Member Since: <small>${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} </small><br />
70 Last Seen: <small>${recent_games[0][1].fuzzy_date()} </small><br />
71 Playing Time: <small>${total_stats['alivetime']} </small><br />
72 % if total_games > 0 and total_stats['wins'] is not None:
73 Win Percentage: <small>${round(float(total_stats['wins'])/total_games * 100, 2)}% (${total_stats['wins']} wins, ${total_games - total_stats['wins']} losses) </small><br />
75 % if total_stats['kills'] > 0 and total_stats['deaths'] > 0:
76 Kill Ratio: <small>${round(float(total_stats['kills'])/total_stats['deaths'], 3)} (${total_stats['kills']} kills, ${total_stats['deaths']} deaths) </small><br />
78 <% games_breakdown_str = ', '.join(["{0} {1}".format(ng, gt) for (gt, ng) in games_breakdown]) %>
79 Games Played: <small>${total_games} (${games_breakdown_str})</small><br />
80 % if elos_display is not None and len(elos_display) > 0:
82 <small>${', '.join(elos_display)} </small>
84 %if '*' in ', '.join(elos_display):
85 <small><i>*preliminary Elo</i></small>
94 % if accs is not None:
98 <div id="acc-graph" style="width:800px; height:200px;">
101 <div class="acc-weap">
103 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'nex'})}" title="Show nex accuracy"></a>
106 <div class="acc-weap">
108 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'rifle'})}" title="Show rifle accuracy"></a>
111 <div class="acc-weap">
112 Show minstanex accuracy.
113 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'minstanex'})}" title="Show minstanex accuracy"></a>
116 <div class="acc-weap">
118 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'uzi'})}" title="Show uzi accuracy"></a>
121 <div class="acc-weap">
122 Show shotgun accuracy.
123 <a href="${request.route_url('player_accuracy', id=player.player_id, _query={'weapon':'shotgun'})}" title="Show shotgun accuracy"></a>
131 ##### RECENT GAMES (v2) ####
135 <h3>Recent Games</h3>
136 <table class="table table-bordered table-condensed">
148 % for (gamestat, game, server, map) in recent_games:
150 <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>
151 <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>
152 <td>${server.name}</td>
155 % if gamestat.team != None:
156 % if gamestat.team == game.winner:
162 % if gamestat.rank == 1:
165 Loss (#${gamestat.rank})
169 <td>${game.fuzzy_date()}</td>
174 % if total_games > 10:
175 <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>