]> de.git.xonotic.org Git - xonotic/xonstat.git/blobdiff - xonstat/templates/player_game_index.mako
Gah, one more place to center the damn button and icon!
[xonotic/xonstat.git] / xonstat / templates / player_game_index.mako
index 1ed3b1575718c3c51aeeb3a5c80ea2733af2c21f..f12966d2216fad6ff4f02c7c26d5aeff61f3fe0f 100644 (file)
@@ -34,36 +34,42 @@ Recent Games
         </tr>
       </thead>
       <tbody>
-      % for g in games.items:
+      % for rg in games.items:
         <tr>
-           <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=g.game_id)}" title="View detailed information about this game">view</a></td>
-           <td class="tdcenter"><img title="${g.game_type_cd}" src="/static/images/icons/24x24/${g.game_type_cd}.png" alt="${g.game_type_cd}" /></td>
-           <td>${g.server_name}</td>
-           <td>${g.map_name}</td>
+           <td class="tdcenter"><a class="btn btn-primary btn-small" href="${request.route_url('game_info', id=rg.game_id)}" title="View detailed information about this game">view</a></td>
+           <td class="tdcenter"><img title="${rg.game_type_cd}" src="/static/images/icons/24x24/${rg.game_type_cd}.png" alt="${rg.game_type_cd}" /></td>
+           <td>${rg.server_name}</td>
+           <td>${rg.map_name}</td>
            <td>
-           % if g.team != None:
-             % if g.team == g.winner:
+           % if rg.team != None:
+             % if rg.team == rg.winner:
              Win
              % else:
              Loss
              % endif
           % else:
-            % if g.rank == 1:
+            % if rg.rank == 1:
             Win
             % else:
-            Loss (#${g.rank})
+            Loss (#${rg.rank})
             % endif
           % endif
            </td>
-           <td><span class="abstime" data-epoch="${g.game_epoch}" title="${g.game_create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${g.game_fuzzy}</span></td>
+           <td><span class="abstime" data-epoch="${rg.epoch}" title="${rg.start_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${rg.fuzzy_date}</span></td>
            <td class="tdcenter">
-             % if round(g.elo_delta,2) > 0:
-             <span title="Elo went up by ${round(g.elo_delta,2)}"><i class="icon-arrow-up icon-white"></i></span>
-             % elif round(g.elo_delta,2) < 0:
-             <span title="Elo went down by ${round(g.elo_delta,2)}"><i class="icon-arrow-down icon-white"></i></span>
+             <a href="${request.route_url('game_info', id=rg.game_id, _query={'show_elo':1})}" title="View detailed information about this game">
+             % if rg.elo_delta is not None:
+               % if round(rg.elo_delta,2) > 0:
+               <span title="Elo went up by ${round(rg.elo_delta,2)}"><i class="icon-arrow-up icon-white"></i></span>
+               % elif round(rg.elo_delta,2) < 0:
+               <span title="Elo went down by ${round(-rg.elo_delta,2)}"><i class="icon-arrow-down icon-white"></i></span>
+               % else:
+               <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
+               % endif
              % else:
-             <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
+               <span title="Elo did not change"><i class="icon-minus icon-white"></i></span>
              % endif
+             </a>
            </td>
         </tr>
       % endfor