From 52e80c82cd845bc7ec89f72170362f85f3c881da Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 28 Mar 2013 15:46:26 -0400 Subject: [PATCH] Make the search page awesome. --- xonstat/templates/search.mako | 225 ++++++++++++++++++++++------------ 1 file changed, 144 insertions(+), 81 deletions(-) diff --git a/xonstat/templates/search.mako b/xonstat/templates/search.mako index 2b9fb0c..778e46c 100644 --- a/xonstat/templates/search.mako +++ b/xonstat/templates/search.mako @@ -1,112 +1,175 @@ <%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> <%namespace file="navlinks.mako" import="navlinks" /> +<%block name="navigation"> +${nav.nav('games')} + + % if results == None: -

Advanced Search

-
- - - - - - - - - - - - - - - - - - - - - - -
Nick:
Server:
Map:
Game Type: - Deathmatch
- Duel
- Capture The Flag
- Team Deathmatch
-
+ +<%block name="title"> +Advanced Search + + +
+
+ + + +
+ + + + + +
+ +
+ +

+
+
+ + +
+ +
+ +

+
+
+ + +
+ +
+ +

+
+
+ + +
+ +
+ + + + +
+
+ + +
+ +
+ +
+
+ +
-% elif len(results) == 0: -

Sorry, nothing found!

-% else: + +
+
+ + + % elif len(results) == 0: +
+
+

Sorry, nothing found!

+
+
+ % else: + +
+
##### player-only results ##### % if result_type == "player": - - - - - - % for player in results: - - - - - % endfor +
PlayerJoined
${player.nick_html_colors()|n}${player.joined_pretty_date()}
+ + + + + % for player in results: + + + + + % endfor
PlayerJoined
${player.nick_html_colors()|n}${player.joined_pretty_date()}
% endif ##### server-only results ##### % if result_type == "server": - - - - - - % for server in results: - - - - - % endfor +
ServerCreated
${server.name}${server.fuzzy_date()}
+ + + + + % for server in results: + + + + + % endfor
ServerCreated
${server.name}${server.fuzzy_date()}
% endif ##### map-only results ##### % if result_type == "map": - - - - - - % for map in results: - - - - - % endfor +
MapAdded
${map.name}${map.fuzzy_date()}
+ + + + + % for map in results: + + + + + % endfor
MapAdded
${map.name}${map.fuzzy_date()}
% endif ##### game results ##### % if result_type == "game": - - - - - - - - % for (game, server, gmap) in results: - - - - - - - % endfor +
MapServerTime
View${gmap.name}${server.name}${game.fuzzy_date()}
+ + + + + + + % for (game, server, gmap) in results: + + + + + + + % endfor
MapServerTime
View${gmap.name}${server.name}${game.fuzzy_date()}
% endif ${navlinks("search", results.page, results.last_page, search_query=query)} +
+
% endif <%block name="js"> -- 2.39.2