1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="navlinks.mako" import="navlinks" />
5 <%block name="navigation">
16 <div class="small-12 large-6 large-offset-3 columns">
18 <form class="form-horizontal">
21 <!-- Form submitted? -->
22 <input type="hidden" name="fs" />
25 <div class="control-group">
26 <label class="control-label">Nick</label>
27 <div class="controls">
28 <input id="nick" name="nick" type="text" placeholder="player nick" class="input-xlarge">
29 <p class="help-block"></p>
34 <div class="control-group">
35 <label class="control-label">Server</label>
36 <div class="controls">
37 <input id="server_name" name="server_name" type="text" placeholder="server name" class="input-xlarge">
38 <p class="help-block"></p>
43 <div class="control-group">
44 <label class="control-label">Map</label>
45 <div class="controls">
46 <input id="map_name" name="map_name" type="text" placeholder="map name" class="input-xlarge">
47 <p class="help-block"></p>
51 <!-- Multiple Checkboxes -->
52 <div class="control-group">
53 <label class="control-label">Game Types</label>
54 <div class="controls">
55 <label class="checkbox">
56 <input type="checkbox" name="dm" value="Deathmatch">
59 <label class="checkbox">
60 <input type="checkbox" name="duel" value="Duel">
63 <label class="checkbox">
64 <input type="checkbox" name="ctf" value="Capture The Flag">
67 <label class="checkbox">
68 <input type="checkbox" name="tdm" value="Team Deathmatch">
75 <div class="control-group">
76 <label class="control-label"></label>
77 <div class="controls">
78 <button id="submit" name="submit" type="submit" class="btn btn-primary">Submit</button>
89 % elif len(results) == 0:
91 <div class="small-12 large-6 large-offset-3 columns">
92 <h1 class="text-center">Sorry, nothing found!</h1>
98 ##### player-only results #####
99 % if result_type == "player":
101 <div class="small-12 large-8 large-offset-2 columns">
102 <table class="table-hover table-condensed">
104 <th class="small-2">ID</th>
105 <th class="small-6">Nick</th>
106 <th class="small-3">Joined</th>
107 <th class="small-1"></th>
109 % for player in results:
111 <td>${player.player_id}</th>
112 <td class="no-stretch"><a href="${request.route_url("player_info", id=player.player_id)}" title="Go to this player's info page">${player.nick_html_colors()|n}</a></th>
113 <td><span class="abstime" data-epoch="${player.epoch()}" title="${player.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${player.fuzzy_date()}</span></th>
114 <td class="text-center">
115 <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="View recent games by this player">
116 <i class="fa fa-list"></i>
124 ##### server-only results #####
125 % if result_type == "server":
127 <div class="small-12 large-8 large-offset-2 columns">
128 <table class="table-hover table-condensed">
130 <th class="small-2">ID</th>
131 <th class="small-6">Name</th>
132 <th class="small-3">Added</th>
133 <th class="small-1"></th>
135 % for server in results:
137 <td>${server.server_id}</td>
138 <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
139 <td><span class="abstime" data-epoch="${server.epoch()}" title="${server.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${server.fuzzy_date()}</span></td>
140 <td class="text-center">
141 <a href="${request.route_url("game_index", _query={'server_id':server.server_id})}" title="View recent games on this server">
142 <i class="fa fa-list"></i>
150 ##### map-only results #####
151 % if result_type == "map":
153 <div class="small-12 large-8 large-offset-2 columns">
154 <table class="table-hover table-condensed">
156 <th class="small-2">ID</th>
157 <th class="small-6">Name</th>
158 <th class="small-3">Added</th>
159 <th class="small-1"></th>
161 % for map in results:
163 <td>${map.map_id}</td>
164 <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
165 <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>
166 <td class="text-center">
167 <a href="${request.route_url("game_index", _query={'map_id':map.map_id})}" title="View recent games on this map">
168 <i class="fa fa-list"></i>
176 ##### game results #####
177 % if result_type == "game":
179 <div class="small-12 large-8 large-offset-2 columns">
180 <table class="table-hover table-condensed">
182 <th class="small-3"></th>
183 <th class="small-3 medium-6">Map</th>
184 <th class="small-3 medium-3">Server</th>
185 <th class="small-3">Time</th>
187 % for (game, server, gmap) in results:
189 <td class="text-center"><a class="tiny button" href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">View</a></td>
190 <td class="no-stretch"><a href="${request.route_url("map_info", id=gmap.map_id)}" name="Map info page for map #${gmap.map_id}">${gmap.name}</a></td>
191 <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>
192 <td><span class="abstime" data-epoch="${game.epoch()}" title="${game.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${game.fuzzy_date()}</span></td>
198 <!-- navigation links -->
199 ${navlinks("search", results.page, results.last_page, search_query=query)}