]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/map_index.mako
Fixing issue with long player nicks, fixes #1313
[xonotic/xonstat.git] / xonstat / templates / map_index.mako
old mode 100755 (executable)
new mode 100644 (file)
index 13eaf4c..d6fd85e
@@ -1,26 +1,44 @@
-<%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 maps:\r
-<h2>Sorry, no maps yet. Get playing!</h2>\r
-\r
-% else:\r
-<h2>Map Index</h2>\r
-<table id="map-index-table" border="1">\r
-  <tr>\r
-    <th>Name</th>\r
-  </tr>\r
-% for map in maps:\r
-  <tr>\r
-    <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>\r
-  </tr>\r
-% endfor\r
-</table>\r
-% endif\r
-\r
-<!-- navigation links -->\r
-${navlinks("map_index_paged", maps.page, maps.last_page)}\r
+<%inherit file="base.mako"/>
+<%namespace name="nav" file="nav.mako" />
+<%namespace file="navlinks.mako" import="navlinks" />
+
+<%block name="navigation">
+${nav.nav('maps')}
+</%block>
+
+<%block name="title">
+Map Index
+</%block>
+
+% if not maps:
+<h2>Sorry, no maps yet. Get playing!</h2>
+
+% else:
+<div class="row">
+  <div class="span6 offset3">
+    <form class="indexform" method="get" action="${request.route_url('search')}">
+      <input type="hidden" name="fs" />
+      <input class="indexbox" type="text" name="map_name" />
+      <input type="submit" value="search" />
+    </form>
+    <table class="table table-hover table-condensed">
+      <tr>
+        <th style="width:70px;">ID</th>
+        <th>Name</th>
+        <th>Added</th>
+      </tr>
+    % for map in maps:
+      <tr>
+        <td>${map.map_id}</td>
+        <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
+        <td><span class="abstime" data-epoch="${map.epoch()}" title="${map.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${map.fuzzy_date()}</span></td>
+    </td>
+      </tr>
+    % endfor
+    </table>
+    % endif
+
+    <!-- navigation links -->
+    ${navlinks("map_index", maps.page, maps.last_page)}
+  </div> <!-- /span4 -->
+</div> <!-- /row -->