Merge branch 'master' into zykure/approved
[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="span8 offset2">
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 style="width:60px;">ID</th>
27         <th>Name</th>
28         <th class="create-dt">Added</th>
29         <th></th>
30       </tr>
31     % for server in servers:
32       <tr>
33         <td>${server.server_id}</td>
34         <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
35         <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>
36         <td class="tdcenter">
37           <a href="${request.route_url("game_index", _query={'server_id':server.server_id})}" title="View recent games on this server">
38             <i class="glyphicon glyphicon-list"></i>
39           </a>
40         </td>
41       </tr>
42     % endfor
43     </table>
44     % endif
45
46     ${navlinks("server_index", servers.page, servers.last_page)}
47   </div> <!-- /span4 -->
48 </div> <!-- /row -->