From 8ea006682fc7e255434946f7f012bf863007d482 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Fri, 20 Mar 2015 20:42:55 -0400 Subject: [PATCH] Convert the search page. --- xonstat/templates/search.mako | 345 +++++++++++++++++----------------- 1 file changed, 169 insertions(+), 176 deletions(-) diff --git a/xonstat/templates/search.mako b/xonstat/templates/search.mako index 7637a3a..45bf794 100644 --- a/xonstat/templates/search.mako +++ b/xonstat/templates/search.mako @@ -3,207 +3,200 @@ <%namespace file="navlinks.mako" import="navlinks" /> <%block name="navigation"> -${nav.nav('games')} + ${nav.nav('games')} % if results == None: -<%block name="title"> -Advanced Search - - -
-
+ <%block name="title"> + Advanced Search + +
+
-
-
+ +
- - + + - -
- -
- -

+ +
+ +
+ +

+
-
- - -
- -
- -

+ + +
+ +
+ +

+
-
- - -
- -
- -

+ + +
+ +
+ +

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

Sorry, nothing found!

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

Sorry, nothing found!

+
-
- % else: - - -##### player-only results ##### -% if result_type == "player": -
-
- - - - - - - - % for player in results: - - - - % endfor -
Player IDNickJoined
${player.player_id} - ${player.nick_html_colors()|n} - ${player.joined_pretty_date()} - - - - -
-% endif - -##### server-only results ##### -% if result_type == "server": -
-
- - - - - - - - % for server in results: - - - - - - % endfor -
IDNameAdded
${server.server_id}${server.name} - ${server.fuzzy_date()} - - - -
-% endif -##### map-only results ##### -% if result_type == "map": -
-
- +% else: + + ##### player-only results ##### + % if result_type == "player": +
+
+
+ + + + + + + % for player in results: + + + + % endfor +
IDNickJoined
${player.player_id} + ${player.nick_html_colors()|n} + ${player.joined_pretty_date()} + + + + +
+ % endif + + ##### server-only results ##### + % if result_type == "server": +
+
+ + + + + + + + % for server in results: + + + + + + % endfor +
IDNameAdded
${server.server_id}${server.name} + ${server.fuzzy_date()} + + + +
+ % endif + + ##### map-only results ##### + % if result_type == "map": +
+
+ + + + + + + + % for map in results: + + + + + + % endfor +
IDNameAdded
${map.map_id}${map.name} + ${map.fuzzy_date()} + + + +
+ % endif + + ##### game results ##### + % if result_type == "game": +
+
+ - - - - - - % for map in results: - - - - + + + + + % for (game, server, gmap) in results: + + + + + + % endfor
IDNameAdded
${map.map_id}${map.name} - ${map.fuzzy_date()} - - - - MapServerTime
View${gmap.name}${server.name}${game.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()}
-% endif + % endif - -${navlinks("search", results.page, results.last_page, search_query=query)} + + ${navlinks("search", results.page, results.last_page, search_query=query)} +
-
% endif - -<%block name="js"> -${parent.js()} - - - -- 2.39.2