From 45ad9bb199e5f683016830b33e41b68850e27a43 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Wed, 16 Nov 2011 12:35:02 -0500 Subject: [PATCH] Reverse sort the map_index page. This is done via the map_id at this point because no create_dt exists. --- xonstat/static/css/style.css | 5 ++++- xonstat/templates/map_index.mako | 4 +--- xonstat/views/map.py | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/xonstat/static/css/style.css b/xonstat/static/css/style.css index b2e104a..56931dc 100755 --- a/xonstat/static/css/style.css +++ b/xonstat/static/css/style.css @@ -368,9 +368,12 @@ input[type=text]:hover, .textbox:hover { background-position:-128px -32px; } margin-bottom: 10px; width:100%; } -#player-index-table{ +#player-index-table { width: 600px; } +#map-index-table { + width: 300px; +} #recent-games { width: 950px; } diff --git a/xonstat/templates/map_index.mako b/xonstat/templates/map_index.mako index ad47b60..7598a4d 100755 --- a/xonstat/templates/map_index.mako +++ b/xonstat/templates/map_index.mako @@ -9,14 +9,12 @@ Map Index - ${parent.title()} % else:

Map Index

- +
- % for map in maps: - % endfor diff --git a/xonstat/views/map.py b/xonstat/views/map.py index aca27d6..659f04f 100755 --- a/xonstat/views/map.py +++ b/xonstat/views/map.py @@ -1,5 +1,6 @@ import logging from pyramid.response import Response +from sqlalchemy import desc from webhelpers.paginate import Page, PageURL from xonstat.models import * from xonstat.util import page_url @@ -17,7 +18,7 @@ def map_index(request): try: map_q = DBSession.query(Map).\ - order_by(Map.name) + order_by(Map.map_id.desc()) maps = Page(map_q, current_page, url=page_url) -- 2.39.2
# Name
${map.map_id} ${map.name}