Merge of zykure's player_info JSON object plus a few bugfixes.
[xonotic/xonstat.git] / xonstat / templates / rank_index.mako
old mode 100755 (executable)
new mode 100644 (file)
index 75f4574..2a72a94
@@ -1,43 +1,39 @@
-<%inherit file="base.mako"/>\r
-<%namespace file="navlinks.mako" import="navlinks" />\r
-\r
-<%block name="title">\r
-Rank Index - ${parent.title()}\r
-</%block>\r
-\r
-% if not ranks:\r
-<h2>Sorry, no ranks yet. Get some buddies together and start playing!</h2>\r
-\r
-% else:\r
-<h2>\r
-% if game_type_cd == 'dm':\r
-Deathmatch \r
-% elif game_type_cd == 'duel':\r
-Duel \r
-% elif game_type_cd == 'tdm':\r
-Team Deathmatch \r
-% elif game_type_cd == 'ctf':\r
-Capture The Flag \r
-% endif\r
-\r
-Rank Index</h2>\r
-<table id="rank-index-table" border="1">\r
-  <tr>\r
-    <th>Rank</th>\r
-    <th>Nick</th>\r
-    <th>Elo</th>\r
-  </tr>\r
-<% i = 1 %>\r
-% for rank in ranks:\r
-  <tr>\r
-    <td>${rank.rank}</td>\r
-    <td><a href="${request.route_url("player_info", id=rank.player_id)}" title="Go to this player's info page">${rank.nick_html_colors()|n}</a></th>\r
-    <td>${round(rank.elo, 3)}</th>\r
-  </tr>\r
-<% i += 1 %>\r
-% endfor\r
-</table>\r
-\r
-<!-- navigation links -->\r
-${navlinks("rank_index_paged", ranks.page, ranks.last_page, game_type_cd=game_type_cd)}\r
-% endif\r
+<%inherit file="base.mako"/>
+<%namespace file="navlinks.mako" import="navlinks" />
+
+<%block name="title">
+% if game_type_cd == 'dm':
+Deathmatch Rank Index
+% elif game_type_cd == 'duel':
+Duel Rank Index
+% elif game_type_cd == 'tdm':
+Team Deathmatch Rank Index
+% elif game_type_cd == 'ctf':
+Capture The Flag Rank Index
+% endif
+</%block>
+
+% if not ranks:
+<h2>Sorry, no ranks yet. Get some buddies together and start playing!</h2>
+
+% else:
+<table id="rank-index-table" border="1">
+  <tr>
+    <th>Rank</th>
+    <th>Nick</th>
+    <th>Elo</th>
+  </tr>
+<% i = 1 %>
+% for rank in ranks:
+  <tr>
+    <td>${rank.rank}</td>
+    <td><a href="${request.route_url("player_info", id=rank.player_id)}" title="Go to this player's info page">${rank.nick_html_colors()|n}</a></th>
+    <td>${round(rank.elo, 3)}</th>
+  </tr>
+<% i += 1 %>
+% endfor
+</table>
+
+<!-- navigation links -->
+${navlinks("rank_index", ranks.page, ranks.last_page, game_type_cd=game_type_cd)}
+% endif