]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Rename the "top" templates to match their views.
authorAnt Zucaro <azucaro@gmail.com>
Sat, 6 Feb 2016 21:28:13 +0000 (16:28 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Sat, 6 Feb 2016 21:28:13 +0000 (16:28 -0500)
xonstat/__init__.py
xonstat/templates/top_maps_by_times_played.mako [deleted file]
xonstat/templates/top_maps_index.mako [new file with mode: 0644]
xonstat/templates/top_players_by_time.mako [deleted file]
xonstat/templates/top_players_index.mako [new file with mode: 0644]
xonstat/templates/top_servers_by_players.mako [deleted file]
xonstat/templates/top_servers_index.mako [new file with mode: 0644]

index 5466efd6b775707a1bbbeb692e67d292a408d4e2..ec8bc310a01798d741ab94006f6cffa44a40d96e 100644 (file)
@@ -102,13 +102,13 @@ def main(global_config, **settings):
     config.add_view(player_weaponstats_data_json, route_name="player_weaponstats_data_json", renderer="jsonp")
 
     config.add_route("top_players_index", "/topactive")
-    config.add_view(top_players_index, route_name="top_players_index", renderer="top_players_by_time.mako")
+    config.add_view(top_players_index, route_name="top_players_index", renderer="top_players_index.mako")
 
     config.add_route("top_servers_index", "/topservers")
-    config.add_view(top_servers_index, route_name="top_servers_index", renderer="top_servers_by_players.mako")
+    config.add_view(top_servers_index, route_name="top_servers_index", renderer="top_servers_index.mako")
 
     config.add_route("top_maps_index", "/topmaps")
-    config.add_view(top_maps_index, route_name="top_maps_index", renderer="top_maps_by_times_played.mako")
+    config.add_view(top_maps_index, route_name="top_maps_index", renderer="top_maps_index.mako")
 
     # GAME ROUTES
     config.add_route("game_info",      "/game/{id:\d+}")
diff --git a/xonstat/templates/top_maps_by_times_played.mako b/xonstat/templates/top_maps_by_times_played.mako
deleted file mode 100644 (file)
index 4a8f358..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<%inherit file="base.mako"/>
-<%namespace name="nav" file="nav.mako" />
-
-<%block name="navigation">
-  ${nav.nav('maps')}
-</%block>
-
-<%block name="title">
-  Active Maps Index
-</%block>
-
-% if not top_maps and start is not None:
-  <h2 class="text-center">Sorry, no more maps!</h2>
-
-% elif not top_maps and start is None:
-  <h2 class="text-center">No active maps found. Yikes, get playing!</h2>
-
-% else:
-##### ACTIVE SERVERS #####
-  <div class="row">
-    <div class="small-12 large-6 large-offset-3 columns">
-      <table class="table-hover table-condensed">
-        <thead>
-          <tr>
-            <th class="small-2">#</th>
-            <th class="small-7">Map</th>
-            <th class="small-3">Games</th>
-          </tr>
-        </thead>
-        <tbody>
-        % for tm in top_maps:
-          <tr>
-            <td>${tm.sort_order}</td>
-            <td class="no-stretch"><a href="${request.route_url('map_info', id=tm.map_id)}" title="Go to the map info page for ${tm.map_name}">${tm.map_name}</a></td>
-            <td>${tm.sort_order}</td>
-          </tr>
-        % endfor
-        </tbody>
-      </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
-    </div>
-  </div>
-
-% if len(top_maps) == 20:
-<div class="row">
-  <div class="small-12 large-6 large-offset-3 columns">
-    <ul class="pagination">
-      <li>
-        <a href="${request.route_url('top_maps_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
-      </li>
-    </ul>
-  </div>
-</div>
-% endif
-
-% endif
diff --git a/xonstat/templates/top_maps_index.mako b/xonstat/templates/top_maps_index.mako
new file mode 100644 (file)
index 0000000..4a8f358
--- /dev/null
@@ -0,0 +1,56 @@
+<%inherit file="base.mako"/>
+<%namespace name="nav" file="nav.mako" />
+
+<%block name="navigation">
+  ${nav.nav('maps')}
+</%block>
+
+<%block name="title">
+  Active Maps Index
+</%block>
+
+% if not top_maps and start is not None:
+  <h2 class="text-center">Sorry, no more maps!</h2>
+
+% elif not top_maps and start is None:
+  <h2 class="text-center">No active maps found. Yikes, get playing!</h2>
+
+% else:
+##### ACTIVE SERVERS #####
+  <div class="row">
+    <div class="small-12 large-6 large-offset-3 columns">
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-2">#</th>
+            <th class="small-7">Map</th>
+            <th class="small-3">Games</th>
+          </tr>
+        </thead>
+        <tbody>
+        % for tm in top_maps:
+          <tr>
+            <td>${tm.sort_order}</td>
+            <td class="no-stretch"><a href="${request.route_url('map_info', id=tm.map_id)}" title="Go to the map info page for ${tm.map_name}">${tm.map_name}</a></td>
+            <td>${tm.sort_order}</td>
+          </tr>
+        % endfor
+        </tbody>
+      </table>
+      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+    </div>
+  </div>
+
+% if len(top_maps) == 20:
+<div class="row">
+  <div class="small-12 large-6 large-offset-3 columns">
+    <ul class="pagination">
+      <li>
+        <a href="${request.route_url('top_maps_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
+      </li>
+    </ul>
+  </div>
+</div>
+% endif
+
+% endif
diff --git a/xonstat/templates/top_players_by_time.mako b/xonstat/templates/top_players_by_time.mako
deleted file mode 100644 (file)
index 9f75ff6..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<%inherit file="base.mako"/>
-<%namespace name="nav" file="nav.mako" />
-
-<%block name="navigation">
-  ${nav.nav('players')}
-</%block>
-
-<%block name="title">
-  Active Players Index
-</%block>
-
-% if not top_players and start is not None:
-  <h2 class="text-center">Sorry, no more players!</h2>
-
-% elif not top_players and start is None:
-  <h2 class="text-center">No active players found. Yikes, get playing!</h2>
-
-% else:
-  ##### ACTIVE PLAYERS #####
-  <div class="row">
-    <div class="small-12 large-6 large-offset-3 columns">
-      <table class="table-hover table-condensed">
-        <thead>
-          <tr>
-            <th class="small-2">#</th>
-            <th class="small-7">Nick</th>
-            <th class="small-3">Play Time</th>
-          </tr>
-        </thead>
-
-        <tbody>
-        % for tp in top_players:
-          <tr>
-            <td>${tp.sort_order}</td>
-            <td class="no-stretch"><a href="${request.route_url('player_info', id=tp.player_id)}" title="Go to the player info page for this player">${tp.nick_html_colors()|n}</a></td>
-            <td>${tp.alivetime}</td>
-          </tr>
-        % endfor
-        </tbody>
-      </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
-    </div>
-  </div>
-
-% if len(top_players) == 20:
-<div class="row">
-  <div class="small-12 large-6 large-offset-3 columns">
-    <ul class="pagination">
-      <li>
-        <a  href="${request.route_url('top_players_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
-      </li>
-    </ul>
-  </div>
-</div>
-% endif
-
-% endif
diff --git a/xonstat/templates/top_players_index.mako b/xonstat/templates/top_players_index.mako
new file mode 100644 (file)
index 0000000..9f75ff6
--- /dev/null
@@ -0,0 +1,57 @@
+<%inherit file="base.mako"/>
+<%namespace name="nav" file="nav.mako" />
+
+<%block name="navigation">
+  ${nav.nav('players')}
+</%block>
+
+<%block name="title">
+  Active Players Index
+</%block>
+
+% if not top_players and start is not None:
+  <h2 class="text-center">Sorry, no more players!</h2>
+
+% elif not top_players and start is None:
+  <h2 class="text-center">No active players found. Yikes, get playing!</h2>
+
+% else:
+  ##### ACTIVE PLAYERS #####
+  <div class="row">
+    <div class="small-12 large-6 large-offset-3 columns">
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-2">#</th>
+            <th class="small-7">Nick</th>
+            <th class="small-3">Play Time</th>
+          </tr>
+        </thead>
+
+        <tbody>
+        % for tp in top_players:
+          <tr>
+            <td>${tp.sort_order}</td>
+            <td class="no-stretch"><a href="${request.route_url('player_info', id=tp.player_id)}" title="Go to the player info page for this player">${tp.nick_html_colors()|n}</a></td>
+            <td>${tp.alivetime}</td>
+          </tr>
+        % endfor
+        </tbody>
+      </table>
+      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+    </div>
+  </div>
+
+% if len(top_players) == 20:
+<div class="row">
+  <div class="small-12 large-6 large-offset-3 columns">
+    <ul class="pagination">
+      <li>
+        <a  href="${request.route_url('top_players_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
+      </li>
+    </ul>
+  </div>
+</div>
+% endif
+
+% endif
diff --git a/xonstat/templates/top_servers_by_players.mako b/xonstat/templates/top_servers_by_players.mako
deleted file mode 100644 (file)
index 4adba45..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<%inherit file="base.mako"/>
-<%namespace name="nav" file="nav.mako" />
-
-<%block name="navigation">
-  ${nav.nav('servers')}
-</%block>
-
-<%block name="title">
-  Active Servers Index
-</%block>
-
-% if not top_servers and start is not None:
-  <h2 class="text-center">Sorry, no more servers!</h2>
-
-% elif not top_servers and start is None:
-  <h2 class="text-center">No active servers found. Yikes, get playing!</h2>
-
-% else:
-##### ACTIVE SERVERS #####
-  <div class="row">
-    <div class="small-12 large-6 large-offset-3 columns">
-      <table class="table-hover table-condensed">
-        <thead>
-          <tr>
-            <th class="small-2">#</th>
-            <th class="small-7">Server</th>
-            <th class="small-3">Games</th>
-          </tr>
-        </thead>
-        <tbody>
-        % for ts in top_servers:
-          <tr>
-            <td>${ts.sort_order}</td>
-            <td class="no-stretch"><a href="${request.route_url('server_info', id=ts.server_id)}" title="Go to the server info page for ${ts.server_name}">${ts.server_name}</a></td>
-            <td>${ts.games}</td>
-          </tr>
-        % endfor
-        </tbody>
-      </table>
-      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
-    </div>
-  </div>
-
-% if len(top_servers) == 20:
-<div class="row">
-  <div class="small-12 large-6 large-offset-3 columns">
-    <ul class="pagination">
-      <li>
-        <a  href="${request.route_url('top_servers_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
-      </li>
-    </ul>
-  </div>
-</div>
-% endif
-
-% endif
diff --git a/xonstat/templates/top_servers_index.mako b/xonstat/templates/top_servers_index.mako
new file mode 100644 (file)
index 0000000..4adba45
--- /dev/null
@@ -0,0 +1,56 @@
+<%inherit file="base.mako"/>
+<%namespace name="nav" file="nav.mako" />
+
+<%block name="navigation">
+  ${nav.nav('servers')}
+</%block>
+
+<%block name="title">
+  Active Servers Index
+</%block>
+
+% if not top_servers and start is not None:
+  <h2 class="text-center">Sorry, no more servers!</h2>
+
+% elif not top_servers and start is None:
+  <h2 class="text-center">No active servers found. Yikes, get playing!</h2>
+
+% else:
+##### ACTIVE SERVERS #####
+  <div class="row">
+    <div class="small-12 large-6 large-offset-3 columns">
+      <table class="table-hover table-condensed">
+        <thead>
+          <tr>
+            <th class="small-2">#</th>
+            <th class="small-7">Server</th>
+            <th class="small-3">Games</th>
+          </tr>
+        </thead>
+        <tbody>
+        % for ts in top_servers:
+          <tr>
+            <td>${ts.sort_order}</td>
+            <td class="no-stretch"><a href="${request.route_url('server_info', id=ts.server_id)}" title="Go to the server info page for ${ts.server_name}">${ts.server_name}</a></td>
+            <td>${ts.games}</td>
+          </tr>
+        % endfor
+        </tbody>
+      </table>
+      <p class="text-center"><small>Note: these figures are from the past 7 days</small>
+    </div>
+  </div>
+
+% if len(top_servers) == 20:
+<div class="row">
+  <div class="small-12 large-6 large-offset-3 columns">
+    <ul class="pagination">
+      <li>
+        <a  href="${request.route_url('top_servers_index', _query=query)}" name="Next Page">Next <i class="fa fa-arrow-right"></i></a>
+      </li>
+    </ul>
+  </div>
+</div>
+% endif
+
+% endif