From 74aeff69f222f56703a30cfc3613d38388700339 Mon Sep 17 00:00:00 2001 From: antzucaro Date: Sun, 14 Apr 2013 11:07:27 -0400 Subject: [PATCH] Show TDM ranks on the front page. --- xonstat/templates/main_index.mako | 8 +++++--- xonstat/views/main.py | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/xonstat/templates/main_index.mako b/xonstat/templates/main_index.mako index f823cb6..a856b24 100644 --- a/xonstat/templates/main_index.mako +++ b/xonstat/templates/main_index.mako @@ -21,7 +21,7 @@ Leaderboard ##### RANKS ##### -% if len(ranks) < 3: +% if len(ranks) < 4:

You don't seem to have any ranks yet.

@@ -30,15 +30,17 @@ Leaderboard % else:
- % for rs in ranks[:3]: + % for rs in ranks[:4]: % if len(rs) > 0: -
+
% if rs[0].game_type_cd == 'duel':

Duel Ranks

% elif rs[0].game_type_cd == 'ctf':

CTF Ranks

% elif rs[0].game_type_cd == 'dm':

DM Ranks

+ % elif rs[0].game_type_cd == 'tdm': +

TDM Ranks

% endif diff --git a/xonstat/views/main.py b/xonstat/views/main.py index dfaa5ee..30833e4 100644 --- a/xonstat/views/main.py +++ b/xonstat/views/main.py @@ -185,7 +185,7 @@ def _main_index_data(request): # the three top ranks tables ranks = [] - for gtc in ['duel', 'ctf', 'dm']: + for gtc in ['duel', 'ctf', 'dm', 'tdm']: rank = get_ranks(gtc) if len(rank) != 0: ranks.append(rank) -- 2.39.2