06086b28ad9fcd404429dfe0016eab2619ad081b
[xonotic/xonstat.git] / xonstat / templates / game_index.mako
1 <%inherit file="base.mako"/>\r
2 <%namespace file="scoreboard.mako" import="scoreboard" />\r
3 \r
4 <%block name="title">\r
5 Game Index - ${parent.title()}\r
6 </%block>\r
7 \r
8 <%block name="js">\r
9 ${parent.js()}\r
10 <script type="text/javascript" src="${request.static_url('xonstat:static/js/jquery.js')}"></script>\r
11 <script type="text/javascript" src="${request.static_url('xonstat:static/js/jquery.dataTables.min.js')}"></script>\r
12 <script>\r
13 $(document).ready(function() { $('.scoreboard').dataTable(); } );\r
14 </script>\r
15 </%block>\r
16 \r
17 % if not games:\r
18 <h2>Sorry, no games yet. Get playing!</h2>\r
19 \r
20 % else:\r
21 <h2>Recent Games</h2>\r
22 % for (game, server, map) in games:\r
23 \r
24 <p>\r
25    <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
26 ## show scoreboard using a def from another file\r
27 ${scoreboard(game.game_type_cd, pgstats[game.game_id])}\r
28 </p>\r
29 \r
30 % endfor\r
31 % endif\r
32 \r
33 % if games.previous_page:\r
34 <a href="${request.route_url("game_index_paged", page=games.previous_page)}" name="Previous Page">Previous</a>\r
35 % endif\r
36 % if games.next_page:\r
37 <a href="${request.route_url("game_index_paged", page=games.next_page)}" name="Next Page">Next</a>\r
38 % endif\r