]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/map_index.mako
Merge branch 'master' into zykure/approved
[xonotic/xonstat.git] / xonstat / templates / map_index.mako
old mode 100755 (executable)
new mode 100644 (file)
index c6ae6b6..7c75016
@@ -1,42 +1,50 @@
-<%inherit file="base.mako"/>\r
-<%namespace name="nav" file="nav.mako" />\r
-<%namespace file="navlinks.mako" import="navlinks" />\r
-\r
-<%block name="navigation">\r
-${nav.nav('maps')}\r
-</%block>\r
-\r
-<%block name="title">\r
-Map Index\r
-</%block>\r
-\r
-% if not maps:\r
-<h2>Sorry, no maps yet. Get playing!</h2>\r
-\r
-% else:\r
-<div class="row">\r
-  <div class="span6">\r
-    <form method="get" action="${request.route_url('search')}">\r
-      <input type="hidden" name="fs" />\r
-      <input type="text" name="map_name" />\r
-      <input type="submit" value="search" />\r
-    </form>\r
-    <table class="table table-bordered table-condensed">\r
-      <tr>\r
-        <th>Name</th>\r
-        <th>Added</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
-        <td>${map.create_dt.strftime('%m/%d/%Y at %H:%M')}</td>\r
-    </td>\r
-      </tr>\r
-    % endfor\r
-    </table>\r
-    % endif\r
-\r
-    <!-- navigation links -->\r
-    ${navlinks("map_index_paged", maps.page, maps.last_page)}\r
-  </div> <!-- /span4 -->\r
-</div> <!-- /row -->\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>
+        <th></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 class="tdcenter">
+          <a href="${request.route_url("game_index", _query={'map_id':map.map_id})}" title="View recent games on this map">
+            <i class="glyphicon glyphicon-list"></i>
+          </a>
+        </td>
+    </td>
+      </tr>
+    % endfor
+    </table>
+    % endif
+
+    <!-- navigation links -->
+    ${navlinks("map_index", maps.page, maps.last_page)}
+  </div> <!-- /span4 -->
+</div> <!-- /row -->