From: Ant Zucaro Date: Sun, 5 Feb 2012 22:46:35 +0000 (-0500) Subject: Integrate searches coming in from the navbar. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=eff48decba85a444335962079ee1e1745b00d1f0;p=xonotic%2Fxonstat.git Integrate searches coming in from the navbar. --- diff --git a/xonstat/templates/search.mako b/xonstat/templates/search.mako index f80050f..ea227dd 100755 --- a/xonstat/templates/search.mako +++ b/xonstat/templates/search.mako @@ -4,7 +4,7 @@ % if results == None:
- +
diff --git a/xonstat/views/search.py b/xonstat/views/search.py index 6f40984..f888a69 100755 --- a/xonstat/views/search.py +++ b/xonstat/views/search.py @@ -114,6 +114,15 @@ def search(request): if request.params.has_key('tdm'): gametypes.append('tdm') query['tdm'] = '' + if request.params.has_key('stype') and request.params.has_key('sval'): + stype = request.params['stype'] + sval = request.params['sval'] + if stype == "players": + nick = sval + if stype == "servers": + server_name = sval + if stype == "maps": + map_name = sval (result_type, q) = search_q(nick=nick, server_name=server_name, map_name=map_name, gametypes=gametypes)
Nick: