]> git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/game_index.mako
Integrate navigation mako file and titles.
[xonotic/xonstat.git] / xonstat / templates / game_index.mako
index 1563872f64b35018cb0638b2be43c80efa4ec878..1fac682e5cc36b50cb0289aad26afa6313319c31 100755 (executable)
@@ -1,28 +1,51 @@
 <%inherit file="base.mako"/>\r
+<%namespace name="nav" file="nav.mako" />\r
 <%namespace file="scoreboard.mako" import="scoreboard" />\r
+<%namespace file="navlinks.mako" import="navlinks" />\r
+\r
+<%block name="navigation">\r
+${nav.nav('games')}\r
+</%block>\r
 \r
 <%block name="title">\r
-Game Index - ${parent.title()}\r
+Game Index\r
 </%block>\r
 \r
 % if not games:\r
 <h2>Sorry, no games yet. Get playing!</h2>\r
 \r
 % else:\r
-<h2>Recent Games</h2>\r
-% for (game, server, map) in games:\r
-<p>\r
-   <a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for ${map.name}">${map.name}</a> on <a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for ${server.name}">${server.name}</a> (<a href="${request.route_url('game_info', id=game.game_id)}" name="Permalink for game #${game.game_id}">permalink</a> for this game)\r
+<div id="filter">\r
+       <h2>Filter</h2>\r
+       <input id="search" type="text" name="search" />\r
+       <input id="show-bots" type="checkbox" class="checkbox" checked="checked" /><label for="show-bots" class="checkbox-label">Show Bots</label><br />\r
+       <h3>Gametype</h3>\r
+       <input id="game-ca" type="checkbox" class="checkbox" /><label for="game-ca" class="checkbox-label">CA</label><br />\r
+       <input id="game-ctf" type="checkbox" class="checkbox" /><label for="game-ctf" class="checkbox-label">CTF</label><br />\r
+       <input id="game-dm" type="checkbox" class="checkbox" /><label for="game-dm" class="checkbox-label">DM</label><br />\r
+       <input id="game-freezetag" type="checkbox" class="checkbox" /><label for="game-freezetag" class="checkbox-label">Freezetag</label><br />\r
+       <h3>Sort By</h3>\r
+       <select id="sort-by">\r
+               <option>Kills</option>\r
+               <option>Deaths</option>\r
+               <option>Suicides</option>\r
+               <option>Time</option>\r
+               <option>Score</option>\r
+       </select>\r
+</div>\r
+<div id="recent-games-list">\r
+       <h2>Recent Games</h2>\r
+       % for (game, server, map) in games:\r
+       <div class="game">\r
+               <img src="/static/images/icons/48x48/${game.game_type_cd}.png"/><h3><a href="${request.route_url("map_info", id=map.map_id)}" name="Map info page for ${map.name}">${map.name}</a> on <a href="${request.route_url("server_info", id=server.server_id)}" name="Server info page for ${server.name}">${server.name}</a> <span class="permalink">(<a href="${request.route_url('game_info', id=game.game_id)}" name="Permalink for game #${game.game_id}">permalink</a>)</span></h3>\r
+       ## show scoreboard using a def from another file\r
+       ${scoreboard(game.game_type_cd, pgstats[game.game_id])}\r
+       </div>\r
+% endfor\r
 \r
-## show scoreboard using a def from another file\r
-${scoreboard(game.game_type_cd, pgstats[game.game_id])}\r
+<!-- navigation links -->\r
+${navlinks("game_index_paged", games.page, games.last_page)}\r
 \r
-% endfor\r
+</div><!-- #recent-games-list -->\r
 % endif\r
 \r
-% if games.previous_page:\r
-<a href="${request.route_url("game_index_paged", page=games.previous_page)}" name="Previous Page">Previous</a>\r
-% endif\r
-% if games.next_page:\r
-<a href="${request.route_url("game_index_paged", page=games.next_page)}" name="Next Page">Next</a>\r
-% endif\r