]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
If there are no recent games, do not show the section.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 30 Nov 2012 00:45:04 +0000 (19:45 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 30 Nov 2012 00:45:04 +0000 (19:45 -0500)
xonstat/templates/main_index.mako
xonstat/views/main.py

index a31aef98b515b2d331f66335099347c05d4908ab..bc227b527f5d73887d10fc78f1a6c1606a451724 100644 (file)
@@ -208,6 +208,7 @@ Leaderboard
   </div> <!-- /span4 -->
 </div> <!-- /row -->
 
+% if len(recent_games) > 0:
 <div class="row">
   <div class="span12">
     <h3>Recent Games</h3>
@@ -243,3 +244,4 @@ Leaderboard
     </table>
   </div> <!-- /span12 -->
 </div> <!-- /row -->
+% endif
index 8ae9b8e190db58ff3ac92c9b166ffc9561a431b0..10505b4a6d54220476a798566cb7a29cf2940de2 100644 (file)
@@ -127,9 +127,6 @@ def main_index(request):
     for i in range(leaderboard_count-len(mainindex_data['top_maps'])):
         mainindex_data['top_maps'].append(('-', '-', '-'))
 
-    for i in range(recent_games_count-len(mainindex_data['recent_games'])):
-        mainindex_data['recent_games'].append(('-', '-', '-', '-'))
-
     return mainindex_data