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