]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/top_players_by_time.mako
Style the game table for ca, dm, duel, rune, and tdm.
[xonotic/xonstat.git] / xonstat / templates / top_players_by_time.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   Active Players Index
11 </%block>
12
13 % if not top_players:
14   <h2>Sorry, no players yet. Get playing!</h2>
15
16 % else:
17   ##### ACTIVE PLAYERS #####
18   <div class="row">
19     <div class="small-12 large-6 large-offset-3 columns">
20       <table class="table-hover table-condensed">
21         <thead>
22           <tr>
23             <th class="small-2">#</th>
24             <th class="small-7">Nick</th>
25             <th class="small-3">Play Time</th>
26           </tr>
27         </thead>
28
29         <tbody>
30         ##### this is to get around the actual row_number/rank of the player not being in the actual query
31         <% i = 1 + (top_players.page-1) * 25%>
32         % for (player_id, nick, alivetime) in top_players.items:
33           <tr>
34             <td>${i}</td>
35             % if player_id != '-':
36             <td class="no-stretch"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
37             % else:
38             <td class="no-stretch">${nick|n}</td>
39             % endif
40             <td>${alivetime}</td>
41           </tr>
42           <% i = i+1 %>
43         % endfor
44         </tbody>
45       </table>
46       <small>*figures are from the past 7 days</small>
47     </div>
48   </div>
49
50   <div class="row">
51     <div class="small-12 large-6 large-offset-3 columns">
52       ${navlinks("top_players_by_time", top_players.page, top_players.last_page)}
53     </div>
54   </div>
55 % endif