]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/player_captimes.mako
Add headers and rearrange so things look clean.
[xonotic/xonstat.git] / xonstat / templates / player_captimes.mako
1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="navlinks.mako" import="navlinks" />
4
5 <%block name="navigation">
6   ${nav.nav('players')}
7 </%block>
8
9 <%block name="title">
10   Player captimes
11 </%block>
12
13 % if len(captimes) == 0:
14   <h2>Sorry, no caps yet. Get playing!</h2>
15   <p><a href="${request.route_url('player_info', id=player.player_id)}">Back to player info page</a></p>
16 % else:
17
18   <div class="row">
19     <div class="small-12 columns">
20       <h4>Fastest Flag Captures by
21         <a href="${request.route_url('player_info', id=player.player_id)}">
22           ${player.nick_html_colors()|n}
23         </a>
24       </h4>
25
26    
27       <table class="table-hover table-condensed">
28         <thead>
29           <tr>
30              <th class="small-2 medium-1">Game</th>
31              <th class="small-2">Captime</th>
32              <th class="small-3">Map</th>
33              <th class="show-for-medium-up small-4">Server</th>
34              <th class="show-for-medium-up small-2">Date</th>
35           </tr>
36         </thead>
37         <tbody>
38         % for ct in captimes.items:
39           <tr>
40             <td class="text-center"><a class="tiny button" href="${request.route_url('game_info', id=ct.game_id)}" title="View detailed information about this game">view</a></td>
41             <td>${ct.fastest_cap.total_seconds()} seconds</td>
42             <td><a href="${request.route_url('map_info', id=ct.map_id)}" title="Go to the detail page for this map">${ct.map_name}</a></td>
43             <td class="show-for-medium-up"><a href="${request.route_url('server_info', id=ct.server_id)}" title="Go to the detail page for this server">${ct.server_name}</a></td>
44             <td class="show-for-medium-up"><span class="abstime" data-epoch="${ct.create_dt_epoch}" title="${ct.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${ct.create_dt_fuzzy}</span></td>
45         % endfor
46         </tbody>
47       </table>
48
49       % if sort == "fastest":
50           <p>* sorted by fastest - sort by <a href="${request.route_url('player_captimes', player_id=player.player_id, _query={"sort":"create_dt", "page":page})}">most recent</a> instead</p>
51       % else:
52           <p>* sorted by most recent - sort by <a href="${request.route_url('player_captimes', player_id=player.player_id, _query={"sort":"fastest", "page":page})}">fastest</a> instead</p>
53       % endif
54
55     </div>
56   </div>
57
58   <!-- navigation links -->
59   ${navlinks("player_captimes", captimes.page, captimes.last_page, player_id=player_id, search_query=request.GET)}
60 % endif