Merge remote-tracking branch 'antzucaro/master'
[xonotic/xonstat.git] / xonstat / templates / rank_index.mako
1 <%inherit file="base.mako"/>\r
2 <%namespace file="navlinks.mako" import="navlinks" />\r
3 \r
4 <%block name="title">\r
5 Rank Index - ${parent.title()}\r
6 </%block>\r
7 \r
8 % if not ranks:\r
9 <h2>Sorry, no ranks yet. Get some buddies together and start playing!</h2>\r
10 \r
11 % else:\r
12 <h2>\r
13 % if game_type_cd == 'dm':\r
14 Deathmatch \r
15 % elif game_type_cd == 'duel':\r
16 Duel \r
17 % elif game_type_cd == 'tdm':\r
18 Team Deathmatch \r
19 % elif game_type_cd == 'ctf':\r
20 Capture The Flag \r
21 % endif\r
22 \r
23 Rank Index</h2>\r
24 <table id="rank-index-table" border="1">\r
25   <tr>\r
26     <th>Rank</th>\r
27     <th>Nick</th>\r
28     <th>Elo</th>\r
29   </tr>\r
30 <% i = 1 %>\r
31 % for rank in ranks:\r
32   <tr>\r
33     <td>${rank.rank}</td>\r
34     <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
35     <td>${round(rank.elo, 3)}</th>\r
36   </tr>\r
37 <% i += 1 %>\r
38 % endfor\r
39 </table>\r
40 \r
41 <!-- navigation links -->\r
42 ${navlinks("rank_index", ranks.page, ranks.last_page, game_type_cd=game_type_cd)}\r
43 % endif\r