]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/game_index.mako
Various small improvements to style and headings
[xonotic/xonstat.git] / xonstat / templates / game_index.mako
index 633ae749d1edc03e11089bc8a5b4951048c8db2c..1dcfd029da765a2a977fee642f0814ddce973d22 100755 (executable)
@@ -1,22 +1,37 @@
 <%inherit file="base.mako"/>\r
+<%namespace file="scoreboard.mako" import="scoreboard" />\r
 \r
 <%block name="title">\r
 Game Index - ${parent.title()}\r
 </%block>\r
 \r
+<%block name="js">\r
+${parent.js()}\r
+<script type="text/javascript" src="${request.static_url('xonstat:static/js/jquery.js')}"></script>\r
+<script type="text/javascript" src="${request.static_url('xonstat:static/js/jquery.dataTables.min.js')}"></script>\r
+<script>\r
+$(document).ready(function() { $('.scoreboard').dataTable(); } );\r
+</script>\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
-<ul>\r
 % for (game, server, map) in games:\r
-   <li>game <a href="${request.route_url("game_info", id=game.game_id)}" name="Game info page for game #${game.game_id}">#${game.game_id}:</a> <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></li>\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.last_page:\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