]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/top_servers_by_players.mako
Define a new block for Foundation customizations.
[xonotic/xonstat.git] / xonstat / templates / top_servers_by_players.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('servers')}
7 </%block>
8
9 <%block name="title">
10   Active Servers Index
11 </%block>
12
13 % if not top_servers:
14   <h2>Sorry, no servers yet. Get playing!</h2>
15
16 % else:
17 ##### ACTIVE SERVERS #####
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">Server</th>
25             <th class="small-3">Games</th>
26           </tr>
27         </thead>
28         <tbody>
29         ##### this is to get around the actual row_number/rank of the server not being in the actual query
30         <% i = 1 + (top_servers.page-1) * 25%>
31         % for (server_id, name, count) in top_servers.items:
32           <tr>
33             <td>${i}</td>
34             % if server_id != '-':
35             <td class="no-stretch"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
36             % else:
37             <td class="no-stretch">${name}</td>
38             % endif
39             <td>${count}</td>
40           </tr>
41           <% i = i+1 %>
42         % endfor
43         </tbody>
44       </table>
45       <small>*figures are from the past 7 days<small>
46     </div>
47   </div>
48
49   <div class="row">
50     <div class="small-12 large-6 large-offset-3 columns">
51       ${navlinks("top_servers_by_players", top_servers.page, top_servers.last_page)}
52     </div>
53   </div>
54
55 % endif