From: Jan D. Behrens Date: Mon, 6 Aug 2012 09:40:27 +0000 (+0200) Subject: Went back to showing only one favorite map/weapon/server; rearranged layout somewhat X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e5658d9745007a8184903ca9a85feec07345c82a;p=xonotic%2Fxonstat.git Went back to showing only one favorite map/weapon/server; rearranged layout somewhat --- diff --git a/xonstat/templates/player_info.mako b/xonstat/templates/player_info.mako index 4e44f3f..4809223 100644 --- a/xonstat/templates/player_info.mako +++ b/xonstat/templates/player_info.mako @@ -189,51 +189,6 @@ Player Information Last Seen: ${recent_games[0][1].fuzzy_date()}
- % if fav_server is not None: - Favorite Servers: - <% srv_list = fav_server[:3] %> - % for srvinfo in srv_list: - % if srvinfo != srv_list[-1]: - <% delim = ", " %> - % else: - <% delim = "" %> - % endif - ${srvinfo['name']}${delim} - % endfor -
- % endif - - % if fav_map is not None: - Favorite Maps: - <% map_list = fav_map[:3] %> - % for mapinfo in map_list: - % if mapinfo != map_list[-1]: - <% delim = ", " %> - % else: - <% delim = "" %> - % endif - ${mapinfo['name']}${delim} - % endfor -
- % endif - - % if fav_weapon is not None: - Favorite Weapons: - <% wpn_list = fav_weapon[:3] %> - % for wpninfo in wpn_list: - % if wpninfo != wpn_list[-1]: - <% delim = ", " %> - % else: - <% delim = "" %> - % endif - ${wpninfo['name']}${delim} - % endfor -
- % endif -

- -
-

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']: @@ -246,14 +201,29 @@ Player Information <% 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 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 fav_map is not None: + Favorite Map: ${fav_map[0]['name']}
+ % 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 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