]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Some fixing up in the "captimes" pages
authorJan Behrens <zykure@web.de>
Tue, 16 Apr 2013 18:03:46 +0000 (20:03 +0200)
committerJan Behrens <zykure@web.de>
Tue, 16 Apr 2013 18:03:46 +0000 (20:03 +0200)
xonstat/templates/map_captimes.mako
xonstat/templates/player_captimes.mako
xonstat/views/map.py

index caca88adf660683ab988ff7f22df4aaea644c25e..55ebc1eb80044d3b8cde85b6ee437f77c999c9c0 100644 (file)
@@ -29,7 +29,13 @@ Map captimes
         <tr>
           <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=ct.game_id)}" title="View detailed information about this game">view</a></td>
           <td>${ct.fastest_cap.total_seconds()} seconds</td>
-          <td class="player-nick"><span class="nick">${ct.player_nick_html|n}</span></td>
+          <td class="player-nick">
+            % if rg.player_id > 2:
+            <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a>
+            % else:
+            ${rg.nick_html_colors|n}
+            % endif
+          </td>
           <td><a href="${request.route_url('server_info', id=ct.server_id)}" title="Go to the detail page for this server">${ct.server_name}</a></td>
           <td><span class="abstime" data-epoch="${ct.create_dt_epoch}" title="${ct.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${ct.create_dt_fuzzy}</span></td>
       % endfor
index b397381083c205a8ee1f789cf93eae4b154c7ec6..7932e2b579be4b615b8fc6e83c4909e973e0e9e1 100644 (file)
@@ -18,7 +18,6 @@ Player captimes
         <tr>
            <th>Game</th>
            <th>Captime</th>
-           ##<th>Nick</th>
            <th>Map</th>
            <th>Server</th>
            <th>Date</th>
@@ -29,7 +28,6 @@ Player captimes
         <tr>
           <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=ct.game_id)}" title="View detailed information about this game">view</a></td>
           <td>${ct.fastest_cap.total_seconds()} seconds</td>
-          ##<td class="player-nick"><span class="nick">${ct.html_nick|n}</span></td>
           <td><a href="${request.route_url('map_info', id=ct.map_id)}" title="Go to the detail page for this map">${ct.map_name}</a></td>
           <td><a href="${request.route_url('server_info', id=ct.server_id)}" title="Go to the detail page for this server">${ct.server_name}</a></td>
           <td><span class="abstime" data-epoch="${ct.create_dt_epoch}" title="${ct.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${ct.create_dt_fuzzy}</span></td>
index bdd8c885c49aa078629057691c3ab5712453834a..cd6f80fb4e849784057f75eb5f0dc1f617e33b22 100644 (file)
@@ -118,7 +118,8 @@ def _map_info_data(request):
                 filter(PlayerCaptime.map_id == map_id).\
                 filter(Player.player_id == PlayerCaptime.player_id).\
                 order_by(PlayerCaptime.fastest_cap).\
-                limit(10).all()
+                limit(25).\
+                all()
 
         captimes = [Captime(c.player_id, html_colors(c.nick),
             c.fastest_cap, c.game_id) for c in captimes_raw]