<h2>${map.name}</h2>
<p><a href="${map_url}">Back to map info page</a></p>
- <h3>Fastest flag capture times:</h3>
+ <h3>Fastest Flag Captures:</h3>
<table class="table table-bordered table-condensed">
<thead>
<td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=ct.game_id)}" title="View detailed information about this game">view</a></td>
<td>${ct.fastest_cap.total_seconds()} seconds</td>
<td class="player-nick">
- % if rg.player_id > 2:
- <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a>
+ % if ct.player_id > 2:
+ <a href="${request.route_url('player_info', id=ct.player_id)}" title="Go to the player info page for this player">${ct.player_nick_html|n}</a>
% else:
${rg.nick_html_colors|n}
% endif
</div>
</div>
+
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Nick</th>
- <th>Score</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Nick</th>
+ <th style="width:90px;">Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>${i}</td>
% if score_player_id != '-':
- <td><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
% else:
- <td>${score_nick}</td>
+ <td class="nostretch" style="max-width:150px;">${score_nick}</td>
% endif
<td>${score_value}</td>
</tr>
% endfor
</tbody>
</table>
- <p class="note">*Most active stats are from the past 7 days</p>
</div>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Nick</th>
- <th>Playing Time</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Nick</th>
+ <th style="width:90px;">Playing Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>${i}</td>
% if player_id != '-':
- <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
% else:
- <td>${nick}</td>
+ <td class="nostretch" style="max-width:150px;">${nick}</td>
% endif
<td>${alivetime}</td>
</tr>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Name</th>
- <th>Times Played</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Name</th>
+ <th style="width:90px;"># Games</th>
</tr>
</thead>
<tbody>
% for (server_id, name, times_played) in top_servers:
<tr>
<td>${i}</td>
- <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for this server">${name}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for this server">${name}</a></td>
<td>${times_played}</td>
</tr>
<% i = i+1 %>
</div>
</div> <!-- /row -->
+<div class="row">
+ <div class="span12">
+ <p class="note">*Most active stats are from the past 7 days</p>
+ </div>
+</div>
+
% if len(captimes) > 0:
<div class="row">
<div class="span6">
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Nick</th>
- <th>Score</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Nick</th>
+ <th style="width:90px;">Score</th>
</tr>
</thead>
<tbody>
<tr>
<td>${i}</td>
% if score_player_id != '-':
- <td><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
% else:
- <td>${score_nick}</td>
+ <td class="nostretch" style="max-width:150px;">${score_nick}</td>
% endif
<td>${score_value}</td>
</tr>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Nick</th>
- <th>Playing Time</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Nick</th>
+ <th style="width:90px;">Playing Time</th>
</tr>
</thead>
<tbody>
<tr>
<td>${i}</td>
% if player_id != '-':
- <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
% else:
- <td>${nick}</td>
+ <td class="nostretch" style="max-width:150px;">${nick}</td>
% endif
<td>${alivetime}</td>
</tr>
<table class="table table-hover table-condensed">
<thead>
<tr>
- <th>#</th>
- <th>Map</th>
- <th># Games</th>
+ <th style="width:40px;">#</th>
+ <th style="width:150px;">Map</th>
+ <th style="width:120px;"># Games</th>
</tr>
</thead>
<tbody>
<tr>
<td>${i}</td>
% if map_id != '-':
- <td><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
+ <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
% else:
- <td>${name}</td>
+ <td class="nostretch" style="max-width:150px;">${name}</td>
% endif
<td>${count}</td>
</tr>
def map_captimes_data(request):
map_id = int(request.matchdict['id'])
-
+
MapCaptimes = namedtuple('PlayerCaptimes', ['fastest_cap', 'create_dt', 'create_dt_epoch', 'create_dt_fuzzy',
'player_id', 'player_nick', 'player_nick_stripped', 'player_nick_html',
'game_id', 'server_id', 'server_name'])
"AND pgs.player_id = ct.player_id "
"AND pgs.game_id = ct.game_id "
"ORDER BY ct.fastest_cap "
+ "LIMIT 25"
).params(map_id=map_id).all()
mmap = DBSession.query(Map).filter_by(map_id=map_id).one()