From: Ant Zucaro Date: Sat, 6 Feb 2016 21:28:13 +0000 (-0500) Subject: Rename the "top" templates to match their views. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e69cf899ced79dce164dda3881653d1d626b7124;p=xonotic%2Fxonstat.git Rename the "top" templates to match their views. --- diff --git a/xonstat/__init__.py b/xonstat/__init__.py index 5466efd..ec8bc31 100644 --- a/xonstat/__init__.py +++ b/xonstat/__init__.py @@ -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 index 4a8f358..0000000 --- a/xonstat/templates/top_maps_by_times_played.mako +++ /dev/null @@ -1,56 +0,0 @@ -<%inherit file="base.mako"/> -<%namespace name="nav" file="nav.mako" /> - -<%block name="navigation"> - ${nav.nav('maps')} - - -<%block name="title"> - Active Maps Index - - -% if not top_maps and start is not None: -

Sorry, no more maps!

- -% elif not top_maps and start is None: -

No active maps found. Yikes, get playing!

- -% else: -##### ACTIVE SERVERS ##### -
-
- - - - - - - - - - % for tm in top_maps: - - - - - - % endfor - -
#MapGames
${tm.sort_order}${tm.map_name}${tm.sort_order}
-

Note: these figures are from the past 7 days -

-
- -% if len(top_maps) == 20: -
-
- -
-
-% endif - -% endif diff --git a/xonstat/templates/top_maps_index.mako b/xonstat/templates/top_maps_index.mako new file mode 100644 index 0000000..4a8f358 --- /dev/null +++ b/xonstat/templates/top_maps_index.mako @@ -0,0 +1,56 @@ +<%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> + +<%block name="navigation"> + ${nav.nav('maps')} + + +<%block name="title"> + Active Maps Index + + +% if not top_maps and start is not None: +

Sorry, no more maps!

+ +% elif not top_maps and start is None: +

No active maps found. Yikes, get playing!

+ +% else: +##### ACTIVE SERVERS ##### +
+
+ + + + + + + + + + % for tm in top_maps: + + + + + + % endfor + +
#MapGames
${tm.sort_order}${tm.map_name}${tm.sort_order}
+

Note: these figures are from the past 7 days +

+
+ +% if len(top_maps) == 20: +
+
+ +
+
+% endif + +% endif diff --git a/xonstat/templates/top_players_by_time.mako b/xonstat/templates/top_players_by_time.mako deleted file mode 100644 index 9f75ff6..0000000 --- a/xonstat/templates/top_players_by_time.mako +++ /dev/null @@ -1,57 +0,0 @@ -<%inherit file="base.mako"/> -<%namespace name="nav" file="nav.mako" /> - -<%block name="navigation"> - ${nav.nav('players')} - - -<%block name="title"> - Active Players Index - - -% if not top_players and start is not None: -

Sorry, no more players!

- -% elif not top_players and start is None: -

No active players found. Yikes, get playing!

- -% else: - ##### ACTIVE PLAYERS ##### -
-
- - - - - - - - - - - % for tp in top_players: - - - - - - % endfor - -
#NickPlay Time
${tp.sort_order}${tp.nick_html_colors()|n}${tp.alivetime}
-

Note: these figures are from the past 7 days -

-
- -% if len(top_players) == 20: -
-
- -
-
-% endif - -% endif diff --git a/xonstat/templates/top_players_index.mako b/xonstat/templates/top_players_index.mako new file mode 100644 index 0000000..9f75ff6 --- /dev/null +++ b/xonstat/templates/top_players_index.mako @@ -0,0 +1,57 @@ +<%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> + +<%block name="navigation"> + ${nav.nav('players')} + + +<%block name="title"> + Active Players Index + + +% if not top_players and start is not None: +

Sorry, no more players!

+ +% elif not top_players and start is None: +

No active players found. Yikes, get playing!

+ +% else: + ##### ACTIVE PLAYERS ##### +
+
+ + + + + + + + + + + % for tp in top_players: + + + + + + % endfor + +
#NickPlay Time
${tp.sort_order}${tp.nick_html_colors()|n}${tp.alivetime}
+

Note: these figures are from the past 7 days +

+
+ +% if len(top_players) == 20: +
+
+ +
+
+% endif + +% endif diff --git a/xonstat/templates/top_servers_by_players.mako b/xonstat/templates/top_servers_by_players.mako deleted file mode 100644 index 4adba45..0000000 --- a/xonstat/templates/top_servers_by_players.mako +++ /dev/null @@ -1,56 +0,0 @@ -<%inherit file="base.mako"/> -<%namespace name="nav" file="nav.mako" /> - -<%block name="navigation"> - ${nav.nav('servers')} - - -<%block name="title"> - Active Servers Index - - -% if not top_servers and start is not None: -

Sorry, no more servers!

- -% elif not top_servers and start is None: -

No active servers found. Yikes, get playing!

- -% else: -##### ACTIVE SERVERS ##### -
-
- - - - - - - - - - % for ts in top_servers: - - - - - - % endfor - -
#ServerGames
${ts.sort_order}${ts.server_name}${ts.games}
-

Note: these figures are from the past 7 days -

-
- -% if len(top_servers) == 20: -
-
- -
-
-% endif - -% endif diff --git a/xonstat/templates/top_servers_index.mako b/xonstat/templates/top_servers_index.mako new file mode 100644 index 0000000..4adba45 --- /dev/null +++ b/xonstat/templates/top_servers_index.mako @@ -0,0 +1,56 @@ +<%inherit file="base.mako"/> +<%namespace name="nav" file="nav.mako" /> + +<%block name="navigation"> + ${nav.nav('servers')} + + +<%block name="title"> + Active Servers Index + + +% if not top_servers and start is not None: +

Sorry, no more servers!

+ +% elif not top_servers and start is None: +

No active servers found. Yikes, get playing!

+ +% else: +##### ACTIVE SERVERS ##### +
+
+ + + + + + + + + + % for ts in top_servers: + + + + + + % endfor + +
#ServerGames
${ts.sort_order}${ts.server_name}${ts.games}
+

Note: these figures are from the past 7 days +

+
+ +% if len(top_servers) == 20: +
+
+ +
+
+% endif + +% endif