From: Ant Zucaro Date: Sat, 12 Mar 2016 14:22:26 +0000 (-0500) Subject: Add a simple form for the versus view. X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=740729237ce6a31fca5f3f68ccf99ec1db65c707;hp=28dad5d3f70a02f515f0378d57dee7f7b4d2abac;p=xonotic%2Fxonstat.git Add a simple form for the versus view. --- diff --git a/xonstat/templates/player_versus.mako b/xonstat/templates/player_versus.mako index 8f81a45..01600a4 100644 --- a/xonstat/templates/player_versus.mako +++ b/xonstat/templates/player_versus.mako @@ -6,6 +6,7 @@ ${nav.nav('players')} +% if p1 is not None and p2 is not None:

${p1.nick_html_colors()|n}

@@ -70,3 +71,52 @@
% endif + +% else: + +
+
+ +
+
+ +
+
+
+ +
+ +
+
+
+ +
+

vs

+
+ +
+
+ +
+ +
+
+
+ +
+ + +
+ +
+ +
+
+ +
+
+ +
+
+ +% endif diff --git a/xonstat/views/player.py b/xonstat/views/player.py index 7668774..83238ad 100644 --- a/xonstat/views/player.py +++ b/xonstat/views/player.py @@ -1167,9 +1167,18 @@ def player_versus_data(request): except Exception as e: log.debug(e) - raise pyramid.httpexceptions.HTTPNotFound + + p1_id = None + p2_id = None + p1 = None + p2 = None + p1_wins = None + p2_wins = None + rgs = None return { + "p1_id" : p1_id, + "p2_id" : p2_id, "p1" : p1, "p2" : p2, "p1_wins" : p1_wins,