]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/player_info.mako
Merge branch 'badges' into approved
[xonotic/xonstat.git] / xonstat / templates / player_info.mako
index 291dcd02d505bb309340ba9fcb25209455f76b29..c88c96c27c924cf3511fbc72ec9b5a7fc6abd033 100644 (file)
@@ -191,7 +191,7 @@ Player Information
     <p>
       Member Since: <small>${player.create_dt.strftime('%m/%d/%Y at %I:%M %p')} </small><br />
 
-      Last Seen: <small>${recent_games[0][1].fuzzy_date()} </small><br />
+      Last Seen: <small><span class="abstime" data-epoch="${recent_games[0][1].epoch()}" title="${recent_games[0][1].create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${recent_games[0][1].fuzzy_date()}</span> </small><br />
 
       Playing Time: <small>${total_stats['alivetime']}
       % if total_stats['alivetime_month'] and total_stats['alivetime'] > total_stats['alivetime_month']:
@@ -450,19 +450,27 @@ Player Information
           </thead>
           <tbody>
             <tr>
-              <td width="30%"><b>Games Played:</b></td>
-              <td width="30%">${total}</td>
-              <td width="40%"></td>
+              <td><b>Games Played:</b></td>
+              <td>${total}</td>
+              % if gtc_key == 'overall':
+              <td></td>
+              % else:
+              <td>${round(float(total)/total_stats['games'] * 100, 2)}% of all games</td>
+              % endif
             </tr>
             <tr>
               <td><b>Playing Time:</b></td>
               <td>${alivetime} hours</td>
+              % if gtc_key == 'overall':
               <td></td>
+              % else:
+              <td>${round(float(alivetime.total_seconds())/total_stats['alivetime'].total_seconds() * 100, 2)}% of total playing time</td>
+              % endif
             </tr>
             <tr>
-              <td><b>Win Percentage:</b></td>
-              <td>${round(float(wins)/total * 100, 2)}%</td>
-              <td>${wins} wins, ${losses} losses</td>
+              <td width="30%"><b>Win Percentage:</b></td>
+              <td width="30%">${round(float(wins)/total * 100, 2)}%</td>
+              <td width="40%">${wins} wins, ${losses} losses</td>
             </tr>
             % if gtc_key == 'ctf':
             <tr>
@@ -581,7 +589,7 @@ Player Information
             % endif
           % endif
            </td>
-           <td>${game.fuzzy_date()}</td>
+           <td><span class="abstime" data-epoch="${game.epoch()}" title="${game.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${game.fuzzy_date()}</span></td>
         </tr>
       % endfor
       </tbody>