X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=xonstat%2Ftemplates%2Fplayer_info.mako;h=d0d619f1131cc18089c84ae6690f5ac0f8383799;hb=ec7b09190ffc16b0d7b0d55947a91fc31a42bde1;hp=70fd74e12ee4ad316fdd3ca3d2cc30e16a5d7280;hpb=82f90469bf71496c6e639da83af04488e0979b16;p=xonotic%2Fxonstat.git diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 70fd74e..d0d619f 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -1,500 +1,287 @@ <%inherit file="base.mako"/> <%namespace name="nav" file="nav.mako" /> -<%namespace file="accuracy.mako" import="accuracy" /> <%block name="navigation"> -${nav.nav('players')} + ##### Disable the login button until a replacement is implemented. + ${nav.nav('players', False)} %block> <%block name="css"> -${parent.css()} - + ${parent.css()} + + %block> <%block name="js"> -${parent.js()} -% if player is not None: - - - - + + + ##### + -% endif + % endfor + + // weapon accuracy and damage charts + $.getJSON("${request.route_url('player_weaponstats_data_json', id=player.player_id, _query={'limit':20})}", function(data) { + + if(data.games.length < 5) { + d3.select(".row #damageChart").remove(); + d3.select(".row #accuracyChart").remove(); + } + drawDamageChart("#damageChart", data); + drawAccuracyChart("#accuracyChart", data); + }); + %block> <%block name="title"> -Player Information + Player Information %block> - -% if player is None: -
Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!
- -% else:
- % if g.game_type_cd in overall_stats:
- Last Played: ${overall_stats[g.game_type_cd].last_played_fuzzy}
- % endif
-
- Games Played: ${g.games}
-
- Playing Time: ${overall_stats[g.game_type_cd].total_playing_time}
-
- % if g.game_type_cd in fav_maps:
- Favorite Map: ${fav_maps[g.game_type_cd].map_name}
- % endif
-
- % if g.game_type_cd == 'ctf':
- % if overall_stats[g.game_type_cd].total_captures is not None:
- Fastest flag captures...
- % endif
- % else:
-
- % endif
-
-
- Win Percentage: ${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses)
-
- % if g.game_type_cd in overall_stats:
- % if overall_stats[g.game_type_cd].k_d_ratio is not None:
- Kill Ratio: ${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)
- % endif
- % endif
-
- % if g.game_type_cd in elos:
+
+ % if g.game_type_cd in overall_stats:
+ Last Played: ${overall_stats[g.game_type_cd].last_played_fuzzy}
+ % else:
+
+ % endif
-
Rocket
- + % if g.game_type_cd == 'ctf': + % if overall_stats[g.game_type_cd].total_captures is not None: + Fastest flag captures...
+ Win Percentage: ${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses)
- % if 'electro' in recent_weapons:
-
Laser
- + % if g.game_type_cd == 'ctf': + % if overall_stats[g.game_type_cd].cap_ratio is not None: + Cap Ratio: ${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)- | Type | -Server | -Map | -Result | -Played | -Elo | -
---|---|---|---|---|---|---|
view | -- | ${rg.server_name} | -${rg.map_name} | -- % if rg.team != None: - % if rg.team == rg.winner: - Win - % else: - Loss - % endif - % else: - % if rg.rank == 1: - Win - % else: - Loss (#${rg.rank}) - % endif - % endif - | -${rg.fuzzy_date} | -- - % if rg.elo_delta is not None: - % if round(rg.elo_delta,2) > 0: - - % elif round(rg.elo_delta,2) < 0: - - % else: - - % endif - % else: - - % endif - - | -
+ | Type | +Server | +Map | +Result | +Played | +Elo | +
---|---|---|---|---|---|---|
view | ++ | ${rg.server_name} | +${rg.map_name} | ++ % if rg.team != None: + % if rg.team == rg.winner: + Win + % else: + Loss + % endif + % else: + % if rg.rank == 1: + Win + % else: + Loss (#${rg.rank}) + % endif + % endif + | +${rg.fuzzy_date} | ++ + % if rg.elo_delta is not None: + % if round(rg.elo_delta,2) > 0: + +${round(rg.elo_delta,2)} + % elif round(rg.elo_delta,2) < 0: + ${round(rg.elo_delta,2)} + % else: + + % endif + % else: + + % endif + + | +