]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/server_index.mako
Remove Persona since it was shut down. :(
[xonotic/xonstat.git] / xonstat / templates / server_index.mako
old mode 100755 (executable)
new mode 100644 (file)
index a859023..9c47423
@@ -1,28 +1,59 @@
-<%inherit file="base.mako"/>\r
-<%namespace file="navlinks.mako" import="navlinks" />\r
-\r
-<%block name="title">\r
-Map Index - ${parent.title()}\r
-</%block>\r
-\r
-% if not servers:\r
-<h2>Sorry, no servers yet. Get playing!</h2>\r
-\r
-% else:\r
-<h2>Server Index</h2>\r
-<table id="server-index-table" border="1">\r
-  <tr>\r
-    <th>Name</th>\r
-    <th class="create-dt">Added</th>\r
-  </tr>\r
-% for server in servers:\r
-  <tr>\r
-    <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>\r
-    <td>${server.create_dt.strftime('%m/%d/%Y at %H:%M')}</td>\r
-  </tr>\r
-% endfor\r
-</table>\r
-% endif\r
-\r
-<!-- navigation links -->\r
-${navlinks("server_index_paged", servers.page, servers.last_page)}\r
+<%inherit file="base.mako"/>
+<%namespace name="nav" file="nav.mako" />
+<%namespace file="navlinks.mako" import="navlinks" />
+
+<%block name="navigation">
+  ${nav.nav('servers')}
+</%block>
+
+<%block name="title">
+  Server Index
+</%block>
+
+% if not servers:
+  <h2>Sorry, no servers yet. Get playing!</h2>
+
+% else:
+  <div class="row">
+    <div class="small-12 large-8 large-offset-2 columns">
+
+      <form method="get" action="${request.route_url('search')}">
+        <div class="row">
+          <div class="small-7 columns">
+            <input type="hidden" name="fs" />
+            <input type="text" name="server_name" />
+          </div>
+          <div class="small-5 columns">
+            <input type="submit" value="search" />
+          </div>
+        </div>
+      </form>
+
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-3">Server ID</th>
+            <th class="small-5">Name</th>
+            <th class="small-3">Added</th>
+            <th class="small-1"></th>
+          </tr>
+        </thead>
+      % for server in servers:
+        <tr>
+          <td>${server.server_id}</td>
+          <td class="no-stretch"><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
+          <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>
+          <td class="text-center">
+            <a href="${request.route_url("game_index", _query={'server_id':server.server_id})}" title="View recent games on this server">
+              <i class="fa fa-list"></i>
+            </a>
+          </td>
+        </tr>
+      % endfor
+      </table>
+
+      ${navlinks("server_index", servers.page, servers.last_page)}
+
+    </div>
+  </div>
+% endif