]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Added link to player captimes; fixed issue with ctf gametype on player_info page
authorJan Behrens <zykure@web.de>
Wed, 17 Apr 2013 19:04:23 +0000 (21:04 +0200)
committerJan Behrens <zykure@web.de>
Wed, 17 Apr 2013 19:04:23 +0000 (21:04 +0200)
xonstat/templates/player_captimes.mako
xonstat/templates/player_info.mako

index 7932e2b579be4b615b8fc6e83c4909e973e0e9e1..fdb9462037c4a6e47f744ca873db7323e5cb7f20 100644 (file)
@@ -5,14 +5,15 @@
 Player captimes
 </%block>
 
+% if len(captimes) == 0:
+  <h2>Sorry, no caps yet. Get playing!</h2>
+% else:
+
 <div class="row">
   <div class="span12">
-
-    <h2><span class="nick">${player.nick_html_colors()|n}</span></h2>
+    <h3>Fastest Flag Captures by ${player.nick_html_colors()|n}</h3>
     <p><a href="${player_url}">Back to player info page</a></p>
-
-    <h3>Fastest flag capture times:</h3>
-
     <table class="table table-hover table-condensed">
       <thead>
         <tr>
@@ -37,3 +38,5 @@ Player captimes
 
   </div>
 </div>
+
+% endif
index 576c526da449d4fd1e6510ee4541d1c2895162e0..f51dac9627cf265cc62e2bfff5c061b2b55916bf 100644 (file)
@@ -220,6 +220,15 @@ Player Information
           % if g.game_type_cd in fav_maps:
           Favorite Map: <small>${fav_maps[g.game_type_cd].map_name} <br /></small>
           % endif
+          
+          % if g.game_type_cd == 'ctf':
+          % if overall_stats[g.game_type_cd].total_captures is not None:
+          <small><a href="${request.route_url("player_captimes", id=player.player_id)}">Fastest flag captures...</a></small>
+          % endif
+          % else:
+          <small><br /></small>
+          % endif
+          
           </p>
         </div>
         <div class="span5">
@@ -253,6 +262,8 @@ Player Information
           % if  overall_stats[g.game_type_cd].cap_ratio is not None:
           Cap Ratio: <small>${round(overall_stats[g.game_type_cd].cap_ratio,2)} (${overall_stats[g.game_type_cd].total_captures} captures, ${overall_stats[g.game_type_cd].total_pickups} pickups) <br /></small>
           % endif
+          % else:
+          <small><br /></small>
           % endif
           </p>
         </div>