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="span6 offset3">
19 <form style="margin-top: 20px;" class="form-horizontal">
22 <!-- Form submitted? -->
23 <input type="hidden" name="fs" />
26 <div class="control-group">
27 <label class="control-label">Nick</label>
28 <div class="controls">
29 <input id="nick" name="nick" type="text" placeholder="player nick" class="input-xlarge">
30 <p class="help-block"></p>
35 <div class="control-group">
36 <label class="control-label">Server</label>
37 <div class="controls">
38 <input id="server_name" name="server_name" type="text" placeholder="server name" class="input-xlarge">
39 <p class="help-block"></p>
44 <div class="control-group">
45 <label class="control-label">Map</label>
46 <div class="controls">
47 <input id="map_name" name="map_name" type="text" placeholder="map name" class="input-xlarge">
48 <p class="help-block"></p>
52 <!-- Multiple Checkboxes -->
53 <div class="control-group">
54 <label class="control-label">Game Types</label>
55 <div class="controls">
56 <label class="checkbox">
57 <input type="checkbox" name="dm" value="Deathmatch">
60 <label class="checkbox">
61 <input type="checkbox" name="duel" value="Duel">
64 <label class="checkbox">
65 <input type="checkbox" name="ctf" value="Capture The Flag">
68 <label class="checkbox">
69 <input type="checkbox" name="tdm" value="Team Deathmatch">
76 <div class="control-group">
77 <label class="control-label"></label>
78 <div class="controls">
79 <button id="submit" name="submit" type="submit" class="btn btn-primary">Submit</button>
90 % elif len(results) == 0:
92 <div class="span6 offset3">
93 <h1 class="text-center">Sorry, nothing found!</h1>
99 ##### player-only results #####
100 % if result_type == "player":
102 <div class="span6 offset3">
103 <table class="table table-hover table-condensed">
105 <th style="width:100px;">Player ID</th>
107 <th class="create-dt">Joined</th>
110 % for player in results:
112 <td>${player.player_id}</th>
113 <td class="player-nick"><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>
114 <td><span class="abstime" data-epoch="${player.epoch()}" title="${player.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${player.joined_pretty_date()}</span></th>
115 <td class="tdcenter">
116 <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="View recent games by this player">
117 <i class="glyphicon glyphicon-list"></i>
125 ##### server-only results #####
126 % if result_type == "server":
128 <div class="span8 offset2">
129 <table class="table table-hover table-condensed">
131 <th style="width:60px;">ID</th>
133 <th class="create-dt">Added</th>
136 % for server in results:
138 <td>${server.server_id}</td>
139 <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
140 <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>
141 <td class="tdcenter">
142 <a href="${request.route_url("game_index", _query={'server_id':server.server_id})}" title="View recent games on this server">
143 <i class="glyphicon glyphicon-list"></i>
151 ##### map-only results #####
152 % if result_type == "map":
154 <div class="span6 offset3">
155 <table class="table table-hover table-condensed">
157 <th style="width:70px;">ID</th>
162 % for map in results:
164 <td>${map.map_id}</td>
165 <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
166 <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>
167 <td class="tdcenter">
168 <a href="${request.route_url("game_index", _query={'map_id':map.map_id})}" title="View recent games on this map">
169 <i class="glyphicon glyphicon-list"></i>
177 ##### game results #####
178 % if result_type == "game":
181 <table class="table table-hover table-condensed">
188 % for (game, server, gmap) in results:
190 <td><a class="btn btn-primary btn-small" href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">View</a></td>
191 <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>
192 <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>
193 <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>
199 <!-- navigation links -->
200 ${navlinks("search", results.page, results.last_page, search_query=query)}