]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Convert the player_index page.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 14 Mar 2015 01:53:21 +0000 (21:53 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 14 Mar 2015 01:53:21 +0000 (21:53 -0400)
xonstat/templates/player_index.mako

index d23decab93d3891a405a83e78ebaf2af619c41f9..36b8cb54d9c21e07105658d0b4b8f3b17faad662 100644 (file)
@@ -3,46 +3,54 @@
 <%namespace file="navlinks.mako" import="navlinks" />
 
 <%block name="navigation">
-${nav.nav('players')}
+  ${nav.nav('players')}
 </%block>
 
 <%block name="title">
-Player Index
+  Player Index
 </%block>
 
 % if not players:
-<h2>Sorry, no players yet. Get playing!</h2>
+  <h2>Sorry, no players yet. Get playing!</h2>
 
 % else:
-<div class="row">
-  <div class="span6 offset3">
-    <form class="indexform" method="get" action="${request.route_url('search')}">
-      <input type="hidden" name="fs" />
-      <input class="indexbox" type="text" name="nick" />
-      <input type="submit" value="search" />
-    </form>
-    <table class="table table-hover table-condensed">
-      <tr>
-        <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 class="player-nick"><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>
-% endif
+  <div class="row">
+    <div class="small-6 small-offset-3 columns">
+
+      <form method="get" action="${request.route_url('search')}">
+        <div class="row">
+          <div class="small-7 columns">
+            <input type="hidden" name="fs" />
+            <input type="text" name="nick" />
+          </div>
+          <div class="small-5 columns">
+            <input type="submit" value="search" />
+          </div>
+        </div>
+      </form>
 
-    ${navlinks("player_index", players.page, players.last_page)}
-  </div> <!-- /span4 -->
-</div> <!-- /row -->
+      <table class="table-hover table-condensed">
+        <tr>
+          <th class="small-3">Player ID</th>
+          <th class="small-5">Nick</th>
+          <th class="small-3">Joined</th>
+          <th class="small-1"></th>
+        </tr>
+      % for player in players:
+        <tr>
+          <td>${player.player_id}</th>
+          <td class="no-stretch"><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="text-center">
+            <a href="${request.route_url("player_game_index", player_id=player.player_id, page=1)}" title="View recent games by this player">
+              <i class="fa fa-list"></i>
+            </a>
+          </td>
+        </tr>
+      % endfor
+      </table>
+
+      ${navlinks("player_index", players.page, players.last_page)}
+    </div>
+  </div>
+% endif