X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fplayer_info.mako;h=956d335f96a1f4a1e29588ae61813b25b7087e7c;hb=f9a4d0bbea31ddfb37911a036c11d5e49d047d62;hp=9227c5302f8ef9d11d84af8d82a7407d800c946b;hpb=85caddabb8b7a121255a250be1ef1d0d37b47ab1;p=xonotic%2Fxonstat.git diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 9227c53..956d335 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -1,488 +1,292 @@ <%inherit file="base.mako"/> <%namespace name="nav" file="nav.mako" /> -<%namespace file="accuracy.mako" import="accuracy" /> <%block name="navigation"> -${nav.nav('players')} + % if player.email_addr is not None: + ${nav.nav('players', True)} + % else: + ${nav.nav('players', False)} + % endif %block> -<%block name="js"> - % if player is not None: - - - - % endif +<%block name="js"> + ${parent.js()} + + + + ##### + + + %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:
- Member Since: ${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')}
-
- Last Seen: ${recent_games[0][1].fuzzy_date()}
-
- Playing Time: ${total_stats['alivetime']}
- % if total_stats['alivetime_month'] and total_stats['alivetime'] > total_stats['alivetime_month']:
- % if total_stats['alivetime_week'] and total_stats['alivetime_month'] > total_stats['alivetime_week']:
-
(${total_stats['alivetime_month']} this month; ${total_stats['alivetime_week']} this week)
- % else:
-
(${total_stats['alivetime_month']} this month)
- % endif
- % endif
-
-
- <% games_breakdown_str = ', '.join(["{0} {1}".format(ng, gt) for (gt, ng) in total_stats['games_breakdown'].items()]) %>
- Games Played: ${total_stats['games']}
(${games_breakdown_str})
-
- % if fav_server is not None:
- Favorite Server: ${fav_server[0]['name']}
- % endif
-
- % if fav_map is not None:
- Favorite Map: ${fav_map[0]['name']}
- % endif
-
- % if fav_weapon is not None:
- Favorite Weapon: ${fav_weapon[0]['name']}
- % endif
-
- % if total_stats['games'] > 0 and total_stats['wins'] is not None:
- Win Percentage: ${round(float(total_stats['wins'])/total_stats['games'] * 100, 2)}% (${total_stats['wins']} wins, ${total_stats['games'] - total_stats['wins']} losses)
- % 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, ${total_stats['suicides']} suicides)
- % endif
-
- % if elos_display is not None and len(elos_display) > 0:
- Elo:
- ${elos_display}
- %if '*' in elos_display:
- *preliminary Elo
- %endif
-
- % endif
+
+ % if g.game_type_cd in overall_stats:
+ Last Played: ${overall_stats[g.game_type_cd].last_played_fuzzy}
+ % 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
+ % else:
+
+ % endif
- % if 'hagar' in recent_weapons:
-
Type | -Games Played | -Win Percentage | -Kill/Cap Ratio | -|
---|---|---|---|---|
- <% total = total_stats['games_breakdown'][gtc_key] %> - <% wins = total_stats[gtc_key+'_wins'] %> - <% losses = total - wins %> - | ${total} | -${round(float(wins)/total * 100, 2)}% (${wins} wins, ${losses} losses) | - % if gtc.lower() == "ctf": - <% caps = total_stats[gtc_key+'_caps'] %> - <% pickups = total_stats[gtc_key+'_pickups'] %> - <% returns = total_stats[gtc_key+'_returns'] %> - <% drops = total_stats[gtc_key+'_drops'] %> - <% fckills = total_stats[gtc_key+'_fckills'] %> -${round(float(caps)/pickups, 3)} (${caps} caps, ${pickups} pickups, ${drops} drops, ${returns} returns, ${fckills} fckills) | - % else: - <% kills = total_stats[gtc_key+'_kills'] %> - <% deaths = total_stats[gtc_key+'_deaths'] %> - <% suicides = total_stats[gtc_key+'_suicides'] %> -${round(float(kills)/deaths, 3)} (${kills} kills, ${deaths} deaths, ${suicides} suicides) | - % endif -
- | Type | -Server | -Map | -Result | -Played | -
---|---|---|---|---|---|
view | -- | ${server.name} | -${map.name} | -- % if gamestat.team != None: - % if gamestat.team == game.winner: - Win - % else: - Loss - % endif - % else: - % if gamestat.rank == 1: - Win - % else: - Loss (#${gamestat.rank}) - % endif - % endif - | -${game.fuzzy_date()} | -
+ | 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 + + | +