From: Ant Zucaro Date: Sun, 25 Nov 2012 15:30:05 +0000 (-0500) Subject: Don't pre-fill the "recent games" section with hyphens. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=71d3a2812284939375b54f24d6bca221cf91bf49;p=xonotic%2Fxonstat.git Don't pre-fill the "recent games" section with hyphens. Just show what is there to show rather than fill up the empty space with...more empty space! --- diff --git a/xonstat/templates/map_info.mako b/xonstat/templates/map_info.mako index 6de55c1..5dc5c0b 100644 --- a/xonstat/templates/map_info.mako +++ b/xonstat/templates/map_info.mako @@ -150,6 +150,7 @@ ${parent.title()} % endif +% if len(recent_games) > 0:

Most Recent Games

@@ -183,6 +184,7 @@ ${parent.title()}
+% endif % endif diff --git a/xonstat/views/map.py b/xonstat/views/map.py index ee149a1..6ecbf37 100644 --- a/xonstat/views/map.py +++ b/xonstat/views/map.py @@ -145,9 +145,6 @@ def map_info(request): leaderboard_count = 10 recent_games_count = 20 - for i in range(recent_games_count-len(mapinfo_data['recent_games'])): - mapinfo_data['recent_games'].append(('-', '-', '-', '-')) - for i in range(leaderboard_count-len(mapinfo_data['top_scorers'])): mapinfo_data['top_scorers'].append(('-', '-', '-'))