From: Ant Zucaro Date: Tue, 17 Mar 2015 22:12:52 +0000 (-0400) Subject: Convert the player_game_index view. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=719d00b98c8bedb04625acdf533c342ccc882159;p=xonotic%2Fxonstat.git Convert the player_game_index view. --- diff --git a/xonstat/static/css/app.css b/xonstat/static/css/app.css index a15c61d..9425cf6 100644 --- a/xonstat/static/css/app.css +++ b/xonstat/static/css/app.css @@ -199,3 +199,15 @@ table thead tr th, table thead tr td, table tr th, table tr td { background-color: #111; color: #aaa; } + +.eloup { + color: #008000; +} + +.elodown { + color: #BE0000; +} + +.eloneutral { + color: gray; +} diff --git a/xonstat/templates/player_game_index.mako b/xonstat/templates/player_game_index.mako index b3c27bb..855befb 100644 --- a/xonstat/templates/player_game_index.mako +++ b/xonstat/templates/player_game_index.mako @@ -3,125 +3,131 @@ <%namespace file="navlinks.mako" import="navlinks" /> <%block name="css"> -${parent.css()} - + ${parent.css()} + <%block name="navigation"> -${nav.nav('games')} + ${nav.nav('games')} <%block name="title"> -Recent Games + Recent Games % if not games: -

Sorry, no +

Sorry, no % if game_type_descr: - ${game_type_descr.lower()} + ${game_type_descr.lower()} % endif - games yet for - ${player.nick_html_colors()|n}. Get playing! -

-

Back to player info page

+ games yet for + ${player.nick_html_colors()|n}. Get playing! + + +

Back to player info page

% else: -
-
-

Recent - % if game_type_descr: - ${game_type_descr} - % endif - Games by - - ${player.nick_html_colors()|n} - -

+
+
+
Recent + % if game_type_descr: + ${game_type_descr} + % endif + Games by + + ${player.nick_html_colors()|n} + +
+
-
-
-
- +
+
+ +
+
-
- - + +
+
+
+ + + + + + + + + + + + + % for rg in games.items: - - - - - - - - - - - % for rg in games.items: - - - - - - - - + + + + - - % endfor - -
TypeServerMapResultPlayedElo
TypeServerMapResultPlayedElo
view${rg.game_type_cd}${rg.server_name}${rg.map_name} - % if rg.team != None: - % if rg.team == rg.winner: - Win - % else: - Loss - % endif - % else: - % if rg.rank == 1: - Win - % else: - Loss (#${rg.rank}) - % endif - % endif - ${rg.fuzzy_date} - - % if rg.elo_delta is not None: - % if round(rg.elo_delta,2) > 0: - +${round(rg.elo_delta,2)} - % elif round(rg.elo_delta,2) < 0: - ${round(rg.elo_delta,2)} + view${rg.game_type_cd}${rg.server_name}${rg.map_name} + % if rg.team != None: + % if rg.team == rg.winner: + Win + % else: + Loss + % endif % else: - + % if rg.rank == 1: + Win + % else: + Loss (#${rg.rank}) + % endif % endif - % else: - - % endif - -
+ + ${rg.fuzzy_date} + + + % if rg.elo_delta is not None: + % if round(rg.elo_delta,2) > 0: + +${round(rg.elo_delta,2)} + % elif round(rg.elo_delta,2) < 0: + ${round(rg.elo_delta,2)} + % else: + + % endif + % else: + + % endif + + + + % endfor + + +
-
- -${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)} + + ${navlinks("player_game_index", games.page, games.last_page, player_id=player_id, search_query=request.GET)} % endif