<div class="row">
<div class="span12 game">
<h3>Scoreboard</h3>
- ${scoreboard(game.game_type_cd, pgstats)}
+ ${scoreboard(game.game_type_cd, pgstats, show_elo)}
</div>
</div>
</td>
<td><span class="abstime" data-epoch="${game.epoch()}" title="${game.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${game.fuzzy_date()}</span></td>
<td class="tdcenter">
- % if gamestat.elo_delta is not None:
- % if round(gamestat.elo_delta,2) > 0:
- <span title="Elo went up by ${round(gamestat.elo_delta,2)}"><i class="icon-arrow-up icon-white"></i></span>
- % elif round(gamestat.elo_delta,2) < 0:
- <span title="Elo went down by ${round(-gamestat.elo_delta,2)}"><i class="icon-arrow-down icon-white"></i></span>
+ <a href="${request.route_url('game_info', id=game.game_id, _query={'show_elo':1})}" title="View detailed information about this game">
+ % if gamestat.elo_delta is not None:
+ % if round(gamestat.elo_delta,2) > 0:
+ <span title="Elo went up by ${round(gamestat.elo_delta,2)}"><i class="icon-arrow-up icon-white"></i></span>
+ % elif round(gamestat.elo_delta,2) < 0:
+ <span title="Elo went down by ${round(-gamestat.elo_delta,2)}"><i class="icon-arrow-down icon-white"></i></span>
+ % else:
+ <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
+ % endif
% else:
- <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
+ <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
% endif
- % else:
- <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
- % endif
+ </a>
</td>
</tr>
% endfor
-<%def name="scoreboard(game_type_cd, pgstats)">
+<%def name="scoreboard(game_type_cd, pgstats, show_elo=False)">
<table class="table table-bordered table-condensed">
${scoreboard_header(game_type_cd, pgstats[0])}
<tbody>
${int(round(pgstat.avg_latency))}
</td>
% endif
- ${scoreboard_row(game_type_cd, pgstat)}
+ ${scoreboard_row(game_type_cd, pgstat)}
<td>${pgstat.score}</td>
+ % if show_elo:
+ % if pgstat.elo_delta is not None:
+ <td>${round(pgstat.elo_delta,2)}</td>
+ % else:
+ <td>-</td>
+ % endif
+ % endif
</tr>
% endfor
</tbody>
<th class="deaths">Deaths</th>
<th class="suicides">Suicides</th>
<th class="score">Score</th>
+ % if show_elo:
+ <th>Elo Change</th>
+ % endif
</tr>
</thead>
% endif
<th class="fck" title="Flag Carrier Kill">FCK</th>
<th class="returns">Returns</th>
<th class="score">Score</th>
+ % if show_elo:
+ <th>Elo Change</th>
+ % endif
</tr>
</thead>
% endif
% endif
<th class="kills">Kills</th>
<th class="score">Score</th>
+ % if show_elo:
+ <th>Elo Change</th>
+ % endif
</tr>
</thead>
% endif
<th class="deaths">Deaths</th>
<th class="suicides">Suicides</th>
<th class="score">Score</th>
+ % if show_elo:
+ <th>Elo Change</th>
+ % endif
</tr>
</thead>
% endif
def _game_info_data(request):
game_id = request.matchdict['id']
+
+ if request.params.has_key('show_elo'):
+ show_elo = True
+ else:
+ show_elo = False
+
try:
notfound = False
pgstats = None
pwstats = None
captimes = None
+ show_elo = False
raise inst
return {'game':game,
'pgstats':pgstats,
'pwstats':pwstats,
'captimes':captimes,
+ 'show_elo':show_elo,
}