]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/game_index.mako
Small fix to address block matching problems.
[xonotic/xonstat.git] / xonstat / templates / game_index.mako
1 <%inherit file="base.mako"/>\r
2 \r
3 <%block name="title">\r
4 Game Index - ${parent.title()}\r
5 </%block>\r
6 \r
7 % if not games:\r
8 <h2>Sorry, no games yet. Get playing!</h2>\r
9 \r
10 % else:\r
11 <h2>Recent Games</h2>\r
12 % for (game, server, map) in games:\r
13 <p>\r
14    <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
15 <table border="1" cellpadding="3">\r
16 \r
17 ############################ CTF Game ############################\r
18 % if game.game_type_cd == 'ctf':\r
19     <tr>\r
20         <td>Nick</td>\r
21         <td>Team</td>\r
22         <td>Kills</td>\r
23         <td>Captures</td>\r
24         <td>Pickups</td>\r
25         <td>Flag Carrier Kills</td>\r
26         <td>Returns</td>\r
27         <td>Score</td>\r
28         <td>Accuracy</td>\r
29     </tr>\r
30 \r
31 % for pgstat in pgstats[game.game_id]:\r
32     <tr>\r
33         <td>\r
34         % if pgstat.player_id > 2:\r
35           <a href="${request.route_url("player_info", id=pgstat.player_id)}"\r
36            title="Go to the info page for this player">\r
37           ${pgstat.nick_html_colors()}\r
38           </a>\r
39         % else:\r
40           ${pgstat.nick_html_colors()}\r
41         % endif\r
42         </td>\r
43         <td style="background-color:${pgstat.team_html_color()};"></td>\r
44         <td>${pgstat.kills}</td>\r
45         <td>${pgstat.captures}</td>\r
46         <td>${pgstat.pickups}</td>\r
47         <td>${pgstat.carrier_frags}</td>\r
48         <td>${pgstat.returns}</td>\r
49         <td>${pgstat.score}</td>\r
50         <td>\r
51         % if pgstat.player_id > 1:\r
52           <a href="${request.route_url("player_weapon_stats", game_id=pgstat.game_id, pgstat_id=pgstat.player_game_stat_id)}"\r
53            title="View weapon accuracy details for this player in this game">\r
54           View\r
55           </a>\r
56         % endif\r
57         </td>\r
58     </tr>\r
59 % endfor\r
60 % endif\r
61 \r
62 \r
63 ############################ DM Game ############################\r
64 % if game.game_type_cd == 'dm':\r
65     <tr>\r
66         <td>Nick</td>\r
67         <td>Kills</td>\r
68         <td>Deaths</td>\r
69         <td>Suicides</td>\r
70         <td>Score</td>\r
71         <td>Accuracy</td>\r
72     </tr>\r
73 \r
74 % for pgstat in pgstats[game.game_id]:\r
75     <tr>\r
76         <td>\r
77         % if pgstat.player_id > 2:\r
78           <a href="${request.route_url("player_info", id=pgstat.player_id)}"\r
79            title="Go to the info page for this player">\r
80           ${pgstat.nick_html_colors()}\r
81           </a>\r
82         % else:\r
83           ${pgstat.nick_html_colors()}\r
84         % endif\r
85         </td>\r
86         <td>${pgstat.kills}</td>\r
87         <td>${pgstat.deaths}</td>\r
88         <td>${pgstat.suicides}</td>\r
89         <td>${pgstat.score}</td>\r
90         <td>\r
91         % if pgstat.player_id > 1:\r
92           <a href="${request.route_url("player_weapon_stats", game_id=pgstat.game_id, pgstat_id=pgstat.player_game_stat_id)}"\r
93            title="View weapon accuracy details for this player in this game">\r
94           View\r
95           </a>\r
96         % endif\r
97         </td>\r
98     </tr>\r
99 % endfor\r
100 % endif\r
101 \r
102 \r
103 ############################ TDM Game ############################\r
104 % if game.game_type_cd == 'tdm':\r
105     <tr>\r
106         <td>Nick</td>\r
107         <td>Team</td>\r
108         <td>Kills</td>\r
109         <td>Deaths</td>\r
110         <td>Suicides</td>\r
111         <td>Score</td>\r
112         <td>Accuracy</td>\r
113     </tr>\r
114 \r
115 % for pgstat in pgstats[game.game_id]:\r
116     <tr>\r
117         <td>\r
118         % if pgstat.player_id > 2:\r
119           <a href="${request.route_url("player_info", id=pgstat.player_id)}"\r
120            title="Go to the info page for this player">\r
121           ${pgstat.nick_html_colors()}\r
122           </a>\r
123         % else:\r
124           ${pgstat.nick_html_colors()}\r
125         % endif\r
126         </td>\r
127         <td style="background-color:${pgstat.team_html_color()};"></td>\r
128         <td>${pgstat.kills}</td>\r
129         <td>${pgstat.deaths}</td>\r
130         <td>${pgstat.suicides}</td>\r
131         <td>${pgstat.score}</td>\r
132         <td>\r
133         % if pgstat.player_id > 1:\r
134           <a href="${request.route_url("player_weapon_stats", game_id=pgstat.game_id, pgstat_id=pgstat.player_game_stat_id)}"\r
135            title="View weapon accuracy details for this player in this game">\r
136           View\r
137           </a>\r
138         % endif\r
139         </td>\r
140     </tr>\r
141 % endfor\r
142 % endif\r
143 \r
144 ############################ End gametype specific stuff ############################\r
145 </table>\r
146 % endfor\r
147 % endif\r
148 \r
149 % if games.previous_page:\r
150 <a href="${request.route_url("game_index_paged", page=games.previous_page)}" name="Previous Page">Previous</a>\r
151 % endif\r
152 % if games.next_page:\r
153 <a href="${request.route_url("game_index_paged", page=games.next_page)}" name="Next Page">Next</a>\r
154 % endif\r