]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Add some comments to game_index.mako so I can see where to add new game types!
authorAnt Zucaro <azucaro@gmail.com>
Mon, 23 May 2011 19:41:06 +0000 (15:41 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Mon, 23 May 2011 19:41:06 +0000 (15:41 -0400)
xonstat/templates/game_index.mako

index 883865ece1539b12067b11328121fa2b902140b8..b2bf3ca68c523747dba7799cf794c0aaa3c06077 100755 (executable)
@@ -13,6 +13,8 @@ Game Index - ${parent.title()}
 <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
 <table border="1" cellpadding="3">\r
+\r
+############################ CTF Game ############################\r
 % if game.game_type_cd == 'ctf':\r
     <tr>\r
         <td>Nick</td>\r
@@ -55,7 +57,89 @@ Game Index - ${parent.title()}
         </td>\r
     </tr>\r
 % endfor\r
-</table>\r
+\r
+\r
+############################ DM Game ############################\r
+% if game.game_type_cd == 'dm':\r
+    <tr>\r
+        <td>Nick</td>\r
+        <td>Kills</td>\r
+        <td>Deaths</td>\r
+        <td>Suicides</td>\r
+        <td>Score</td>\r
+        <td>Accuracy</td>\r
+    </tr>\r
+\r
+% for pgstat in pgstats[game.game_id]:\r
+    <tr>\r
+        <td>\r
+        % if pgstat.player_id > 2:\r
+          <a href="${request.route_url("player_info", id=pgstat.player_id)}"\r
+           title="Go to the info page for this player">\r
+          ${pgstat.nick_html_colors()}\r
+          </a>\r
+        % else:\r
+          ${pgstat.nick_html_colors()}\r
+        % endif\r
+        </td>\r
+        <td>${pgstat.kills}</td>\r
+        <td>${pgstat.deaths}</td>\r
+        <td>${pgstat.suicides}</td>\r
+        <td>${pgstat.score}</td>\r
+        <td>\r
+        % if pgstat.player_id > 1:\r
+          <a href="${request.route_url("player_weapon_stats", game_id=pgstat.game_id, pgstat_id=pgstat.player_game_stat_id)}"\r
+           title="View weapon accuracy details for this player in this game">\r
+          View\r
+          </a>\r
+        % endif\r
+        </td>\r
+    </tr>\r
+% endfor\r
+\r
+\r
+############################ TDM Game ############################\r
+% if game.game_type_cd == 'tdm':\r
+    <tr>\r
+        <td>Nick</td>\r
+        <td>Team</td>\r
+        <td>Kills</td>\r
+        <td>Deaths</td>\r
+        <td>Suicides</td>\r
+        <td>Score</td>\r
+        <td>Accuracy</td>\r
+    </tr>\r
+\r
+% for pgstat in pgstats[game.game_id]:\r
+    <tr>\r
+        <td>\r
+        % if pgstat.player_id > 2:\r
+          <a href="${request.route_url("player_info", id=pgstat.player_id)}"\r
+           title="Go to the info page for this player">\r
+          ${pgstat.nick_html_colors()}\r
+          </a>\r
+        % else:\r
+          ${pgstat.nick_html_colors()}\r
+        % endif\r
+        </td>\r
+        <td style="background-color:${pgstat.team_html_color()};"></td>\r
+        <td>${pgstat.kills}</td>\r
+        <td>${pgstat.deaths}</td>\r
+        <td>${pgstat.suicides}</td>\r
+        <td>${pgstat.score}</td>\r
+        <td>\r
+        % if pgstat.player_id > 1:\r
+          <a href="${request.route_url("player_weapon_stats", game_id=pgstat.game_id, pgstat_id=pgstat.player_game_stat_id)}"\r
+           title="View weapon accuracy details for this player in this game">\r
+          View\r
+          </a>\r
+        % endif\r
+        </td>\r
+    </tr>\r
+% endfor\r
+\r
+############################ End gametype specific stuff ############################\r
+% </table>\r
 % endif\r
 % endfor\r
 % endif\r