]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/top_servers_by_players.mako
Merge branch 'master' into zykure/wip
[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="span6 offset3">
19     <table class="table table-hover table-condensed">
20       <thead>
21         <tr>
22           <th style="width:40px;">#</th>
23           <th style="width:180px;">Server</th>
24           <th style="width:60px;">Games</th>
25         </tr>
26       </thead>
27       <tbody>
28       ##### this is to get around the actual row_number/rank of the server not being in the actual query
29       <% i = 1 + (top_servers.page-1) * 25%>
30       % for (server_id, name, count) in top_servers.items:
31         <tr>
32           <td>${i}</td>
33           % if server_id != '-':
34           <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
35           % else:
36           <td class="nostretch" style="max-width:180px;">${name}</td>
37           % endif
38           <td>${count}</td>
39         </tr>
40         <% i = i+1 %>
41       % endfor
42       </tbody>
43     </table>
44     <p class="note">*figures are from the past 7 days</p>
45   </div> <!-- /span4 -->
46 % endif
47
48 ${navlinks("top_servers_by_players", top_servers.page, top_servers.last_page)}
49   </div> <!-- /span4 -->
50 </div> <!-- /row -->