<script src="/static/js/bootstrap-tab.js"></script>
<script type="text/javascript">
$(function () {
- $('#gbtab').click(function(e) {
+ $('#gbtab li').click(function(e) {
e.preventDefault();
$(this).tab('show');
})
- $('#gbtab a:first').tab('show');
+ $('#gbtab a:first').tab('show');
})
</script>
</div>
<div class="row">
- <div id="gbtabcontainer" class="tabbable tabs-right">
- <ul id="gbtab" class="nav nav-tabs">
- % for g in games_played:
- <li><a href="#tab-${g.game_type_cd}" data-toggle="tab">${g.game_type_cd} (${g.games})</a></li>
- % endfor
- </ul>
-
+ <div id="gbtabcontainer" class="tabbable tabs-below">
<div class="tab-content">
% for g in games_played:
<div class="tab-pane fade in
<div class="span5">
<p>
% if g.game_type_cd in overall_stats:
- Last Played: <small>${overall_stats[g.game_type_cd].last_played.strftime('%a, %d %b %Y %H:%M UTC')} <br /></small>
+ 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>
% endif
Games Played: <small>${g.games} <br /></small>
+ Playing Time: <small>${overall_stats[g.game_type_cd].total_playing_time} <br /></small>
+
% if g.game_type_cd in fav_maps:
Favorite Map: <small>${fav_maps[g.game_type_cd].map_name} <br /></small>
% endif
-
- Win Percentage: <small>${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses) <br /></small>
</p>
</div>
<div class="span5">
<p>
+ Win Percentage: <small>${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses) <br /></small>
+
% if g.game_type_cd in overall_stats:
- 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>
+ % if overall_stats[g.game_type_cd].k_d_ratio is not None:
+ 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>
+ % endif
% endif
% if g.game_type_cd in elos:
% if g.game_type_cd in ranks:
% if g.game_type_cd == 'overall':
- Best Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (${ranks[g.game_type_cd].game_type_cd})<br /></small>
+ Best Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (${ranks[g.game_type_cd].game_type_cd}, percentile: ${round(ranks[g.game_type_cd].percentile,2)})<br /></small>
% else:
- Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} <br /></small>
+ Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (percentile: ${round(ranks[g.game_type_cd].percentile,2)})<br /></small>
% endif
% endif
% if g.game_type_cd == 'ctf':
- 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>
+ % if overall_stats[g.game_type_cd].cap_ratio is not None:
+ 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>
+ % endif
% endif
</p>
</div>
</div>
</div>
</div>
+<div class="row">
+ <div class="span12">
+ <ul id="gbtab" class="nav nav-tabs">
+ % for g in games_played:
+ <li>
+ <a href="#tab-${g.game_type_cd}" data-toggle="tab">
+ <img src="/static/images/icons/24x24/${g.game_type_cd}.png"> <br />
+ ${g.game_type_cd} <br />
+ <small>(${g.games})</small>
+ </a>
+ </li>
+ % endfor
+ </ul>
+ </div>
+</div>
% if 'nex' in recent_weapons or 'rifle' in recent_weapons or 'minstanex' in recent_weapons or 'uzi' in recent_weapons or 'shotgun' in recent_weapons: