From: Ant Zucaro Date: Fri, 30 Nov 2012 00:45:04 +0000 (-0500) Subject: If there are no recent games, do not show the section. X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=commitdiff_plain;h=5e33d230ecd8a3db4a94dabbfee18fa7ffd19951 If there are no recent games, do not show the section. --- 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