]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/top_players_by_time.mako
Merge branch 'master' into zykure/wip
[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="span6 offset3">
20     <table class="table table-hover table-condensed">
21       <thead>
22         <tr>
23           <th style="width:40px;">#</th>
24           <th style="width:150px;">Nick</th>
25           <th class="play-time" style="width:90px;">Play Time</th>
26         </tr>
27       </thead>
28       <tbody>
29       ##### this is to get around the actual row_number/rank of the player not being in the actual query
30       <% i = 1 + (top_players.page-1) * 25%>
31       % for (player_id, nick, alivetime) in top_players.items:
32         <tr>
33           <td>${i}</td>
34           % if player_id != '-':
35           <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>
36           % else:
37           <td class="nostretch" style="max-width:150px;">${nick|n}</td>
38           % endif
39           <td class="play-time">${alivetime}</td>
40         </tr>
41         <% i = i+1 %>
42       % endfor
43       </tbody>
44     </table>
45     <p class="note">*figures are from the past 7 days</p>
46   </div> <!-- /span4 -->
47 % endif
48
49 ${navlinks("top_players_by_time", top_players.page, top_players.last_page)}
50   </div> <!-- /span4 -->
51 </div> <!-- /row -->