Merge branch 'master' into zykure/approved
authorJan Behrens <zykure@web.de>
Sat, 20 Apr 2013 09:47:05 +0000 (11:47 +0200)
committerJan Behrens <zykure@web.de>
Sat, 20 Apr 2013 09:47:05 +0000 (11:47 +0200)
Conflicts:
xonstat/templates/player_game_index.mako

1  2 
xonstat/templates/main_index.mako
xonstat/templates/player_game_index.mako

index a35104e9366b9eef020848951517e6f1aa6716f3,1814b2f1c06fba94b605de51dfc9f8a1bbb128a1..983f2eebb7888ba7a82f10c06886e1ccb3bfc4f1
@@@ -46,9 -46,9 +46,9 @@@ Leaderboar
        <table class="table table-hover table-condensed">
          <thead>
            <tr>
 -            <th>#</th>
 -            <th>Nick</th>
 -            <th>Elo</th>
 +            <th style="width:40px;">#</th>
 +            <th style="width:150px;">Nick</th>
 +            <th style="width:60px;">Elo</th>
            </tr>
          </thead>
          <tbody>
@@@ -56,7 -56,7 +56,7 @@@
          % for r in rs:
          <tr>
            <td>${i}</td>
 -          <td class="player-nick" style="max-width: 16em;"><a href="${request.route_url('player_info', id=r.player_id)}" title="Go to the player info page for this player">${r.nick_html_colors()|n}</a></td>
 +          <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=r.player_id)}" title="Go to the player info page for this player">${r.nick_html_colors()|n}</a></td>
            <td>${int(round(r.elo))}</td>
          </tr>
          <% i = i+1 %>
@@@ -79,9 -79,9 +79,9 @@@
      <table class="table table-hover table-condensed">
        <thead>
          <tr>
 -          <th>#</th>
 -          <th>Nick</th>
 -          <th class="play-time">Play Time</th>
 +          <th style="width:40px;">#</th>
 +          <th style="width:150px;">Nick</th>
 +          <th class="play-time" style="width:90px;">Play Time</th>
          </tr>
        </thead>
        <tbody>
@@@ -90,9 -90,9 +90,9 @@@
          <tr>
            <td>${i}</td>
            % if player_id != '-':
 -          <td class="player-nick"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
 +          <td class="nostretch" style="max-width:150px;"><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
            % else:
 -          <td>${nick|n}</td>
 +          <td class="nostretch" style="max-width:150px;">${nick|n}</td>
            % endif
            <td class="play-time">${alivetime}</td>
          </tr>
        % endfor
        </tbody>
      </table>
 -    <p class="note">*Most active stats are from the past 7 days</p>
    </div> <!-- /span4 -->
  
  
      <table class="table table-hover table-condensed">
        <thead>
          <tr>
 -          <th>#</th>
 -          <th>Server</th>
 -          <th>Games</th>
 +          <th style="width:40px;">#</th>
 +          <th style="width:180px;">Server</th>
 +          <th style="width:60px;">Games</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>${i}</td>
            % if server_id != '-':
 -          <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
 +          <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for ${name}">${name}</a></td>
            % else:
 -          <td>${name}</td>
 +          <td class="nostretch" style="max-width:180px;">${name}</td>
            % endif
            <td>${count}</td>
          </tr>
      <table class="table table-hover table-condensed">
        <thead>
          <tr>
 -          <th>#</th>
 -          <th>Map</th>
 -          <th>Games</th>
 +          <th style="width:40px;">#</th>
 +          <th style="width:180px;">Map</th>
 +          <th style="width:60px;">Games</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td>${i}</td>
            % if map_id != '-':
 -          <td><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
 +          <td class="nostretch" style="max-width:180px;"><a href="${request.route_url('map_info', id=map_id)}" title="Go to the map info page for ${name}">${name}</a></td>
            % else:
 -          <td>${name}</td>
 +          <td class="nostretch" style="max-width:180px;">${name}</td>
            % endif
            <td>${count}</td>
          </tr>
      </table>
    </div> <!-- /span4 -->
  </div> <!-- /row -->
 +<row class="span12">
 +    <p class="note">*Most active stats are from the past 7 days</p>
 +</div>
  
  
  ##### RECENT GAMES #####
            <td><a href="${request.route_url('server_info', id=rg.server_id)}" title="Go to the detail page for this server">${rg.server_name}</a></td>
            <td><a href="${request.route_url('map_info', id=rg.map_id)}" title="Go to the map detail page for this map">${rg.map_name}</a></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="player-nick">
 +          <td class="nostretch">
              % if rg.player_id > 2:
              <a href="${request.route_url('player_info', id=rg.player_id)}" title="Go to the player info page for this player">${rg.nick_html_colors|n}</a></td>
              % else:
          % endfor
          </tbody>
      </table>
-     <p><a href="${request.route_url('game_finder')}">More...</a></p>
+     <p><a href="${request.route_url('game_index')}">More...</a></p>
    </div> <!-- /span12 -->
  </div> <!-- /row -->
  % endif
index dabef434500c393a13b06f059d5c06169f975c73,68c1a5ec33acd711fe962fa00b3391a6dff300b0..18eeeabb98a8151edd65f5e307866f722fe35a14
@@@ -44,18 -44,21 +44,22 @@@ Recent Game
    <div class="span12 tabbable">
      <ul class="nav nav-tabs">
        % for game in games_played:
-       <li>
 +      % if not game.game_type_cd in ['cq']:
 -
+       <li 
+       % if game.game_type_cd == game_type_cd or (game.game_type_cd == 'overall' and game_type_cd is None):
+       class="active"
+       % endif
+       >
        % if game.game_type_cd == 'overall':
        <a href="${request.route_url("player_game_index", player_id=player.player_id)}" alt="${game.game_type_cd}" title="" data-toggle="none">
        % else:
-       <a href="${request.route_url("player_game_index", player_id=player.player_id, _query={'game_type_cd':game.game_type_cd})}" alt="${game.game_type_cd}" title="" data-toggle="none">
+       <a href="${request.route_url("player_game_index", player_id=player.player_id, _query={'type':game.game_type_cd})}" alt="${game.game_type_cd}" title="" data-toggle="none">
        % endif
          <span class="sprite sprite-${game.game_type_cd}"> </span><br />
          ${game.game_type_cd} <br />
        </a>
        </li>
 +      % endif
        % endfor
      </ul>
    </div>