X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fplayer_info.mako;h=1e7536269b8fe6114e7692c7de1c769e3ba7c32f;hb=864ed19fb46d669620ebe2330676a7fb5416773c;hp=2b580464ed8cf0761ada7a537faa6e7009b91e3a;hpb=8de456e69e5748f49e9d58568519d6f1a264c444;p=xonotic%2Fxonstat.git diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 2b58046..1e75362 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -1,370 +1,223 @@ <%inherit file="base.mako"/> <%namespace name="nav" file="nav.mako" /> -<%namespace file="accuracy.mako" import="accuracy" /> <%block name="navigation"> ${nav.nav('players')} %block> -<%block name="js"> - % if player is not None: - - - - % endif +<%block name="js"> +${parent.js()} + + + + %block> <%block name="title"> Player Information %block> - -% if player is None: -
Seriously though, he probably doesn't exist...just a figment of your imagination. Carry on then!
- -% else:
- Member Since: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')}
+
+ % if g.game_type_cd in overall_stats:
+ Last Played: ${overall_stats[g.game_type_cd].last_played_fuzzy}
+ % else:
+
+ % endif
- Last Seen: ${recent_games[0][1].fuzzy_date()}
+ Games Played:
+ % if g.game_type_cd == 'overall':
+
+ % else:
+
+ % endif
+ ${g.games}
- Playing Time: ${total_stats['alivetime']}
+ Playing Time: ${overall_stats[g.game_type_cd].total_playing_time}
- <% games_breakdown_str = ', '.join(["{0} {1}".format(ng, gt) for (gt, ng) in games_breakdown]) %>
- Games Played: ${total_games} (${games_breakdown_str})
+ % if g.game_type_cd in fav_maps:
+ Favorite Map: ${fav_maps[g.game_type_cd].map_name}
+ % else:
+
+ % endif
- % if fav_map is not None:
- Favorite Map: ${fav_map['name']}
- % endif
-
- % if total_games > 0 and total_stats['wins'] is not None:
- Win Percentage: ${round(float(total_stats['wins'])/total_games * 100, 2)}% (${total_stats['wins']} wins, ${total_games - total_stats['wins']} losses)
- % endif
+ % if g.game_type_cd == 'ctf':
+ % if overall_stats[g.game_type_cd].total_captures is not None:
+ Fastest flag captures...
+ % else:
+
+ % endif
+ % else:
+
+ % endif
- % if total_stats['kills'] > 0 and total_stats['deaths'] > 0:
- Kill Ratio: ${round(float(total_stats['kills'])/total_stats['deaths'], 3)} (${total_stats['kills']} kills, ${total_stats['deaths']} deaths)
- % endif
+
+ Win Percentage: ${round(g.win_pct,2)}% (${g.wins} wins, ${g.losses} losses)
- % if elos_display is not None and len(elos_display) > 0:
- Elo:
- ${', '.join(elos_display)}
-
- %if '*' in ', '.join(elos_display):
- *preliminary Elo
- %endif
- % endif
+ % 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
+ % else:
+
+ % endif
+
+ % if g.game_type_cd in elos:
+ % if g.game_type_cd == 'overall':
+ Best Elo: ${round(elos[g.game_type_cd].elo,2)} (${elos[g.game_type_cd].game_type_cd}, ${elos[g.game_type_cd].games} games)
+ % else:
+ Elo: ${round(elos[g.game_type_cd].elo,2)} (${elos[g.game_type_cd].games} games)
+ % endif
+ % else:
+
+ % endif
+
+ % if g.game_type_cd in ranks:
+ % if g.game_type_cd == 'overall':
+ Best Rank: ${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)})
+ % else:
+ Rank:
+
+
+ ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank}
+ (percentile: ${round(ranks[g.game_type_cd].percentile,2)})
+
+
+ % endif
+ % else:
+
+ % endif
- % if ranks_display != '':
- Ranks: ${ranks_display}
+ % 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)
+ % else:
+
+ % endif
+ % else:
+
+ % endif
+
- | Type | -Server | -Map | -Result | -Played | ++ | Type | +Server | +Map | +Result | +Played | +Elo |
---|---|---|---|---|---|---|---|---|---|---|---|---|
view | -- | ${server.name} | -${map.name} | -- % if gamestat.team != None: - % if gamestat.team == game.winner: - Win - % else: - Loss - % endif + % for rg in recent_games: + | ||||||||
view | ++ | ${rg.server_name} | +${rg.map_name} | ++ % if rg.team != None: + % if rg.team == rg.winner: + Win % else: - % if gamestat.rank == 1: - Win + 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: - Loss (#${gamestat.rank}) + % endif - % endif - | -${game.fuzzy_date()} | -