From ba16af1b8ddbb002dfd7bae87cfac8cc014c39e6 Mon Sep 17 00:00:00 2001 From: Ant Zucaro <azucaro@gmail.com> Date: Sun, 27 Oct 2013 11:21:45 -0400 Subject: [PATCH] Argh. I always forget to add the template. --- xonstat/templates/top_players_by_time.mako | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 xonstat/templates/top_players_by_time.mako diff --git a/xonstat/templates/top_players_by_time.mako b/xonstat/templates/top_players_by_time.mako new file mode 100644 index 0000000..e101479 --- /dev/null +++ b/xonstat/templates/top_players_by_time.mako @@ -0,0 +1,51 @@ +<%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> +<%namespace file="navlinks.mako" import="navlinks" /> + +<%block name="navigation"> +${nav.nav('players')} +</%block> + +<%block name="title"> +Active Players Index +</%block> + +% if not top_players: +<h2>Sorry, no players yet. Get playing!</h2> + +% else: +##### ACTIVE PLAYERS ##### +<div class="row"> + <div class="span6 offset3"> + <table class="table table-hover table-condensed"> + <thead> + <tr> + <th style="width:40px;">#</th> + <th style="width:150px;">Nick</th> + <th class="play-time" style="width:90px;">Play Time</th> + </tr> + </thead> + <tbody> + ##### this is to get around the actual row_number/rank of the player not being in the actual query + <% i = 1 + (top_players.page-1) * 25%> + % for (player_id, nick, alivetime) in top_players.items: + <tr> + <td>${i}</td> + % if player_id != '-': + <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 class="nostretch" style="max-width:150px;">${nick|n}</td> + % endif + <td class="play-time">${alivetime}</td> + </tr> + <% i = i+1 %> + % endfor + </tbody> + </table> + <p class="note">*figures are from the past 7 days</p> + </div> <!-- /span4 --> +% endif + +${navlinks("top_players_by_time", top_players.page, top_players.last_page)} + </div> <!-- /span4 --> +</div> <!-- /row --> -- 2.39.5