From 2dffdb9dbb4402376f774340251fa88006f68ebb Mon Sep 17 00:00:00 2001
From: Ant Zucaro <azucaro@gmail.com>
Date: Tue, 16 Apr 2013 20:52:11 -0400
Subject: [PATCH] Show recent games link on *index pages.

---
 xonstat/templates/map_index.mako    | 6 ++++++
 xonstat/templates/player_index.mako | 6 ++++++
 xonstat/templates/server_index.mako | 8 +++++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/xonstat/templates/map_index.mako b/xonstat/templates/map_index.mako
index d6fd85e..62dac7e 100644
--- a/xonstat/templates/map_index.mako
+++ b/xonstat/templates/map_index.mako
@@ -26,12 +26,18 @@ Map Index
         <th style="width:70px;">ID</th>
         <th>Name</th>
         <th>Added</th>
+        <th></th>
       </tr>
     % for map in maps:
       <tr>
         <td>${map.map_id}</td>
         <td><a href="${request.route_url("map_info", id=map.map_id)}" title="Go to this map's info page">${map.name}</a></th>
         <td><span class="abstime" data-epoch="${map.epoch()}" title="${map.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${map.fuzzy_date()}</span></td>
+         <td class="tdcenter">
+          <a href="${request.route_url("game_finder", _query={'map_id':map.map_id})}" title="View recent games on this map">
+            <i class="glyphicon glyphicon-list"></i>
+          </a>
+        </td>
     </td>
       </tr>
     % endfor
diff --git a/xonstat/templates/player_index.mako b/xonstat/templates/player_index.mako
index a574d4c..9eb3197 100644
--- a/xonstat/templates/player_index.mako
+++ b/xonstat/templates/player_index.mako
@@ -26,12 +26,18 @@ Player Index
         <th style="width:100px;">Player ID</th>
         <th>Nick</th>
         <th class="create-dt">Joined</th>
+        <th></th>
       </tr>
     % for player in players:
       <tr>
         <td>${player.player_id}</th>
         <td><a href="${request.route_url("player_info", id=player.player_id)}" title="Go to this player's info page">${player.nick_html_colors()|n}</a></th>
         <td><span class="abstime" data-epoch="${player.epoch()}" title="${player.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${player.joined_pretty_date()}</span></th>
+        <td class="tdcenter">
+          <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="View recent games by this player">
+            <i class="glyphicon glyphicon-list"></i>
+          </a>
+        </td>
       </tr>
     % endfor
     </table>
diff --git a/xonstat/templates/server_index.mako b/xonstat/templates/server_index.mako
index 3217bed..d266ba3 100644
--- a/xonstat/templates/server_index.mako
+++ b/xonstat/templates/server_index.mako
@@ -15,7 +15,7 @@ Server Index
 
 % else:
 <div class="row">
-  <div class="span6 offset3">
+  <div class="span8 offset2">
     <form class="indexform" method="get" action="${request.route_url('search')}">
       <input type="hidden" name="fs" />
       <input class="indexbox" type="text" name="server_name" />
@@ -26,12 +26,18 @@ Server Index
         <th style="width:60px;">ID</th>
         <th>Name</th>
         <th class="create-dt">Added</th>
+        <th></th>
       </tr>
     % for server in servers:
       <tr>
         <td>${server.server_id}</td>
         <td><a href="${request.route_url("server_info", id=server.server_id)}" title="Go to this server's info page">${server.name}</a></th>
         <td><span class="abstime" data-epoch="${server.epoch()}" title="${server.create_dt.strftime('%a, %d %b %Y %H:%M:%S UTC')}">${server.fuzzy_date()}</span></td>
+        <td class="tdcenter">
+          <a href="${request.route_url("game_finder", _query={'server_id':server.server_id})}" title="View recent games on this server">
+            <i class="glyphicon glyphicon-list"></i>
+          </a>
+        </td>
       </tr>
     % endfor
     </table>
-- 
2.39.5