]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Link to the rank page from player info.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 1 Aug 2013 01:59:22 +0000 (21:59 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 1 Aug 2013 01:59:22 +0000 (21:59 -0400)
xonstat/templates/player_info.mako

index 570eb0c791acf7fe2a26f764f0729a1290f51110..677c0580417e0eb5a3d56ca66a991e62ed4ab2a8 100644 (file)
@@ -277,7 +277,21 @@ Player Information
           % if g.game_type_cd == 'overall':
           Best Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (${ranks[g.game_type_cd].game_type_cd}, percentile: ${round(ranks[g.game_type_cd].percentile,2)}) <br /></small>
           % else:
-          Rank: <small>${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank} (percentile: ${round(ranks[g.game_type_cd].percentile,2)}) <br /></small>
+          Rank: 
+          <small>
+            <a href="
+              % if ranks[g.game_type_cd].rank % 20 == 0:
+                ${request.route_url('rank_index', game_type_cd=g.game_type_cd, _query={'page':ranks[g.game_type_cd].rank/20})}
+
+              % else:
+                ${request.route_url('rank_index', game_type_cd=g.game_type_cd, _query={'page':ranks[g.game_type_cd].rank/20+1})}
+
+              % endif
+            " title="Player rank page for this player">
+            ${ranks[g.game_type_cd].rank} of ${ranks[g.game_type_cd].max_rank}</a>
+            (percentile: ${round(ranks[g.game_type_cd].percentile,2)})
+            <br />
+          </small>
           % endif
           % else:
           <small><br /></small>