]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/map_index.mako
Show recent games link on *index pages.
[xonotic/xonstat.git] / xonstat / templates / map_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('maps')}
7 </%block>
8
9 <%block name="title">
10 Map Index
11 </%block>
12
13 % if not maps:
14 <h2>Sorry, no maps 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="map_name" />
22       <input type="submit" value="search" />
23     </form>
24     <table class="table table-hover table-condensed">
25       <tr>
26         <th style="width:70px;">ID</th>
27         <th>Name</th>
28         <th>Added</th>
29         <th></th>
30       </tr>
31     % for map in maps:
32       <tr>
33         <td>${map.map_id}</td>
34         <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
35         <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>
36          <td class="tdcenter">
37           <a href="${request.route_url("game_finder", _query={'map_id':map.map_id})}" title="View recent games on this map">
38             <i class="glyphicon glyphicon-list"></i>
39           </a>
40         </td>
41     </td>
42       </tr>
43     % endfor
44     </table>
45     % endif
46
47     <!-- navigation links -->
48     ${navlinks("map_index", maps.page, maps.last_page)}
49   </div> <!-- /span4 -->
50 </div> <!-- /row -->