X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=xonstat%2Ftemplates%2Fgame_info.mako;h=389f0c981b416be0eeb749bb1535165089e9c573;hb=40ce03905c7693f17564906def643115e178ebe9;hp=1c7d58093e23a986daf007aecba82184c005bd19;hpb=d8ecceef4a7d06d05fe1dfc2cf7169d2756761f4;p=xonotic%2Fxonstat.git diff --git a/xonstat/templates/game_info.mako b/xonstat/templates/game_info.mako index 1c7d580..389f0c9 100644 --- a/xonstat/templates/game_info.mako +++ b/xonstat/templates/game_info.mako @@ -1,84 +1,164 @@ <%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> +<%namespace file="scoreboard.mako" import="scoreboard" /> +<%namespace file="accuracy.mako" import="accuracy" /> +<%namespace file="frag_matrix.mako" import="frag_matrix" /> + +<%block name="navigation"> + ${nav.nav('games')} + + +<%block name="foundation"> + + <%block name="title"> -Game Information - ${parent.title()} + Game Information % if game is None: -

Sorry, that game wasn't found!

+

Sorry, that game wasn't found!

% else: -

Game Detail

-

-Played on: ${start_dt.strftime('%m/%d/%Y at %I:%M %p')}
-Game Type: ${game_type_cd}
-Server: ${server_name}
-Map: ${map_name}
-

- -

Scoreboard

- -% if game_type_cd == 'ctf': - - - - - - - - - - - -% for player_game_stat in player_game_stats: - - - - - - - - - - -% endfor -% endif +

+ + + % if teamscores: +
+
NickKillsCapturesPickupsFlag Carrier KillsReturnsScoreAccuracy
- % if player_game_stat.player_id > 2: - - ${player_game_stat.nick_html_colors()} - - % else: - ${player_game_stat.nick_html_colors()} - % endif - ${player_game_stat.kills}${player_game_stat.captures}${player_game_stat.pickups}${player_game_stat.carrier_frags}${player_game_stat.returns}${player_game_stat.score} - % if player_game_stat.player_id > 1: - - View - +
+ +
+

Game #${game.game_id}

+

+ ${gametype.descr}
+ Played ${game.fuzzy_date()}
+ Server: ${server.name}
+ Map: ${map.name}
+ % if game.duration is not None: + Duration: ${"%s:%02d" % (game.duration.seconds/60, game.duration.seconds%60)} % endif -

+ + + + + + % for ts in teamscores: + + % endfor + +
TeamScore
${ts.team.capitalize()}${ts.score}
+ + % endif + + + ##### Games that have team scores push the scoreboard table to the right by + ##### one column. + % if len(tgstats) == len(stats_by_team): + % for tgstat in tgstats: +
+ +
+
+ ${tgstat.team_html_color().capitalize()} +
+
+ % if game.game_type_cd == 'ctf': + ${tgstat.caps} + % elif game.game_type_cd == 'ca': + ${tgstat.rounds} + % elif game.game_type_cd == 'nb': + ${tgstat.caps} + % else: + ${tgstat.score} + % endif +
+
+ +
+ ${scoreboard(game.game_type_cd, stats_by_team[tgstat.team], show_elo, show_latency)} +
+
+ % endfor + + ##### Games that do not have team scores use the full width + % else: + % for team in stats_by_team.keys(): +
+
+ ${scoreboard(game.game_type_cd, stats_by_team[team], show_elo, show_latency)} +
+
+ % endfor + % endif + + % if len(captimes) > 0: +
+
+

Best Flag Capture Times

+ + + + + + + + + % for pgs in captimes: + + + + + % endfor + +
NickCaptime
+ % if pgs.player_id > 2: + + ${pgs.nick_html_colors()|n} + + % else: + ${pgs.nick_html_colors()|n} + % endif + ${round(float(pgs.fastest.seconds) + (pgs.fastest.microseconds/1000000.0), 2)}
+
+
+ % endif + + % if show_frag_matrix: +
+
+

Frag Matrix

+ ${frag_matrix(pgstats, matrix_by_pgstat_id)} +
+
+ % endif + + % if len(pgstats) > 0 and len(pwstats) > 0: +
+
+

Player Accuracies

+ +
+
+ % endif -% if game_type_cd == 'dm': - - Nick - Kills - Deaths - Suicides - Score - - -% for player_game_stat in player_game_stats: - - ${player_game_stat.nick_html_colors()} - ${player_game_stat.kills} - ${player_game_stat.deaths} - ${player_game_stat.suicides} - ${player_game_stat.score} - -% endfor -% endif - % endif