]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/game_finder.mako
Filter cq gametype from player_game_index
[xonotic/xonstat.git] / xonstat / templates / game_finder.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('games')}
7 </%block>
8
9 <%block name="css">
10     ${parent.css()}
11     <link href="/static/css/sprites.css" rel="stylesheet">
12 </%block>
13
14 % if len(recent_games) > 0:
15 <div class="row">
16   <div class="span12">
17     <h3>Recent Games</h3>
18     <table class="table table-hover table-condensed">
19       <thead>
20         <tr>
21           <th></th>
22           <th>Type</th>
23           <th>Server</th>
24           <th>Map</th>
25           <th>Time</th>
26           <th>Winner</th>
27         </tr>
28       </thead>
29       <tbody>
30       % for rg in recent_games.items:
31         <tr>
32           <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
33           <td class="tdcenter"><span alt="${rg.game_type_cd}" class="sprite sprite-${rg.game_type_cd}" title="${rg.game_type_descr}"></span></td>
34           <td><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
35           <td><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></td>
36           <td><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
37           <td>
38             % if rg.player_id > 2:
39             <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a></td>
40             % else:
41             ${rg.nick_html_colors|n}</td>
42             % endif
43         </tr>
44         % endfor
45         </tbody>
46     </table>
47   </div> <!-- /span12 -->
48 </div> <!-- /row -->
49
50 <!-- navigation links -->
51 ${navlinks("game_finder", recent_games.page, recent_games.last_page, search_query=query)}
52 % endif