From 5e33d230ecd8a3db4a94dabbfee18fa7ffd19951 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 29 Nov 2012 19:45:04 -0500 Subject: [PATCH] If there are no recent games, do not show the section. --- xonstat/templates/main_index.mako | 2 ++ xonstat/views/main.py | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako index a31aef9..bc227b5 100644 --- a/xonstat/templates/main_index.mako +++ b/xonstat/templates/main_index.mako @@ -208,6 +208,7 @@ Leaderboard +% if len(recent_games) > 0:

Recent Games

@@ -243,3 +244,4 @@ Leaderboard
+% endif diff --git a/xonstat/views/main.py b/xonstat/views/main.py index 8ae9b8e..10505b4 100644 --- a/xonstat/views/main.py +++ b/xonstat/views/main.py @@ -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 -- 2.39.2