1 <%inherit file="base.mako"/>
2 <%namespace file="navlinks.mako" import="navlinks" />
5 <form action="${request.route_url("search")}" method="get">
6 <input type="hidden" name="fs" />
7 <table id="search_form" class="table table-bordered table-condensed" border="0">
9 <td style="text-align:right;">Nick:</td>
10 <td><input type="text" name="nick" /></td>
13 <td style="text-align:right;">Server:</td>
14 <td><input type="text" name="server_name" /></td>
17 <td style="text-align:right;">Map:</td>
18 <td><input type="text" name="map_name" /></td>
21 <td style="text-align:right;">Game Type:</td>
23 <input type="checkbox" name="dm" />Deathmatch<br/>
24 <input type="checkbox" name="duel" />Duel<br/>
25 <input type="checkbox" name="ctf" />Capture The Flag<br/>
26 <input type="checkbox" name="tdm" />Team Deathmatch<br/>
30 <td style="text-align:right;"></td>
31 <td><input type="submit" value="search" /></td>
35 % elif len(results) == 0:
36 <h1>Sorry, nothing found!</h1>
39 ##### player-only results #####
40 % if result_type == "player":
46 % for player in results:
48 <td><a href="${request.route_url("player_info", id=player.player_id)}" name="Player info page for player #${player.player_id}">${player.nick_html_colors()|n}</a></td>
49 <td>${player.joined_pretty_date()}</td>
55 ##### server-only results #####
56 % if result_type == "server":
62 % for server in results:
64 <td><a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for server #${server.server_id}">${server.name}</a></td>
65 <td>${server.create_dt.strftime('%m/%d/%Y at %I:%M %p')}</td>
71 ##### map-only results #####
72 % if result_type == "map":
80 <td><a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for map #${map.map_id}">${map.name}</a></td>
81 <td>${map.create_dt.strftime('%m/%d/%Y at %I:%M %p')}</td>
87 ##### game results #####
88 % if result_type == "game":
96 % for (game, server, gmap) in results:
98 <td><a href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">${game.game_id}</a></td>
99 <td><a href="${request.route_url("map_info", id=gmap.map_id)}" name="Map info page for map #${gmap.map_id}">${gmap.name}</a></td>
100 <td><a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for server #${server.server_id}">${server.name}</a></td>
101 <td>${game.create_dt.strftime('%m/%d/%Y at %I:%M %p')}</td>
107 <!-- navigation links -->
108 ${navlinks("search_paged", results.page, results.last_page, _query=query)}