fc3cb92d01431acacf87ace610405df8866220ba
[xonotic/xonstat.git] / xonstat / templates / server_index.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 Server Index
11 </%block>
12
13 % if not servers:
14 <h2>Sorry, no servers yet. Get playing!</h2>
15
16 % else:
17 <div class="row">
18   <div class="span6 offset3">
19     <form class="indexform" method="get" action="${request.route_url('search')}">
20       <input type="hidden" name="fs" />
21       <input class="indexbox" type="text" name="server_name" />
22       <input type="submit" value="search" />
23     </form>
24     <table class="table table-hover table-condensed">
25       <tr>
26         <th>Name</th>
27         <th class="create-dt">Added</th>
28       </tr>
29     % for server in servers:
30       <tr>
31         <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
32         <td><span class="abstime" data-epoch="${server.epoch()}" title="${server.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${server.fuzzy_date()}</span></td>
33       </tr>
34     % endfor
35     </table>
36     % endif
37
38     ${navlinks("server_index", servers.page, servers.last_page)}
39   </div> <!-- /span4 -->
40 </div> <!-- /row -->