]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/map_index.mako
Style the game table for ca, dm, duel, rune, and tdm.
[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="small-12 large-6 large-offset-3 columns">
19
20       <form method="get" action="${request.route_url('search')}">
21         <div class="row">
22           <div class="small-7 columns">
23             <input type="hidden" name="fs" />
24             <input type="text" name="map_name" />
25           </div>
26           <div class="small-5 columns">
27             <input type="submit" value="search" />
28           </div>
29         </div>
30       </form>
31
32       <table class="table-hover table-condensed">
33         <thead>
34           <tr>
35             <th class="small-3">ID</th>
36             <th class="small-5">Name</th>
37             <th class="small-3">Added</th>
38             <th class="small-1"></th>
39           </tr>
40         </thead>
41       % for map in maps:
42         <tr>
43           <td>${map.map_id}</td>
44           <td class="no-stretch"><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
45           <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>
46            <td class="text-center">
47             <a href="${request.route_url("game_index", _query={'map_id':map.map_id})}" title="View recent games on this map">
48               <i class="fa fa-list"></i>
49             </a>
50           </td>
51       </td>
52         </tr>
53       % endfor
54       </table>
55
56       <!-- navigation links -->
57       ${navlinks("map_index", maps.page, maps.last_page)}
58     </div> <!-- /span4 -->
59   </div> <!-- /row -->
60 % endif