]> git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/game_index.mako
Remove <ul>s, center tables, and tweak the team colors a bit.
[xonotic/xonstat.git] / xonstat / templates / game_index.mako
index 56cb2a515e31dae17d118ab3a5636df6d7ccc842..4bf9547ce7d94de995c12d9a000d133d8baf2f02 100755 (executable)
@@ -1,4 +1,5 @@
 <%inherit file="base.mako"/>\r
+<%namespace file="scoreboard.mako" import="scoreboard" />\r
 \r
 <%block name="title">\r
 Game Index - ${parent.title()}\r
@@ -9,9 +10,21 @@ Game Index - ${parent.title()}
 \r
 % else:\r
 <h2>Recent Games</h2>\r
-<ul>\r
-% for (game_id, server_id, server_name, map_id, map_name) in games:\r
-   <li>game <a href="${request.route_url("game_info", id=game_id)}" name="Game info page for game #${game_id}">#${game_id}:</a> <a href="${request.route_url("map_info", id=map_id)}" name="Map info page for ${map_name}">${map_name}</a> on <a href="${request.route_url("server_info", id=server_id)}" name="Server info page for ${server_name}">${server_name}</a></li>\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
+\r
+<div align="center">\r
+## show scoreboard using a def from another file\r
+${scoreboard(game.game_type_cd, pgstats[game.game_id])}\r
+</div>\r
+\r
 % endfor\r
-</ul>\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