]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Don't pre-fill the "recent games" section with hyphens.
authorAnt Zucaro <azucaro@gmail.com>
Sun, 25 Nov 2012 15:30:05 +0000 (10:30 -0500)
committerJan Behrens <zykure@web.de>
Sun, 23 Dec 2012 14:18:34 +0000 (15:18 +0100)
Just show what is there to show rather than fill up the empty space
with...more empty space!

xonstat/templates/map_info.mako
xonstat/views/map.py

index 6de55c13d6c73eeab388d518458575c63190de5c..5dc5c0b2cd0501704ff604aaf09811968f41ca35 100644 (file)
@@ -150,6 +150,7 @@ ${parent.title()}
 % endif
 
 
+% if len(recent_games) > 0:
 <div class="row">
   <div class="span12">
     <h3>Most Recent Games</h3>
@@ -183,6 +184,7 @@ ${parent.title()}
     </table>
   </div>
 </div>
+% endif
 
 
 % endif
index ee149a1ef5d0095b99fdee4495872c624b00b8a4..6ecbf371760dfa6c1adce920a5468b0cab46835f 100644 (file)
@@ -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(('-', '-', '-'))