From: Jan Behrens Date: Thu, 18 Apr 2013 22:29:21 +0000 (+0200) Subject: Add non-breaking tables to map_info/server_info; fix map_captimes X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonstat.git;a=commitdiff_plain;h=e25f7224d32a6c46d7c43c728121e95e6a321580 Add non-breaking tables to map_info/server_info; fix map_captimes --- diff --git a/xonstat/templates/map_captimes.mako b/xonstat/templates/map_captimes.mako index 55ebc1e..4fc0ec5 100644 --- a/xonstat/templates/map_captimes.mako +++ b/xonstat/templates/map_captimes.mako @@ -12,7 +12,7 @@ Map captimes

${map.name}

Back to map info page

-

Fastest flag capture times:

+

Fastest Flag Captures:

@@ -30,8 +30,8 @@ Map captimes
view ${ct.fastest_cap.total_seconds()} seconds - % if rg.player_id > 2: - ${rg.nick_html_colors|n} + % if ct.player_id > 2: + ${ct.player_nick_html|n} % else: ${rg.nick_html_colors|n} % endif @@ -44,3 +44,4 @@ Map captimes + diff --git a/xonstat/templates/map_info.mako b/xonstat/templates/map_info.mako index 9e872b5..1c817ea 100644 --- a/xonstat/templates/map_info.mako +++ b/xonstat/templates/map_info.mako @@ -33,9 +33,9 @@ ${parent.title()} - - - + + + @@ -44,9 +44,9 @@ ${parent.title()} % if score_player_id != '-': - + % else: - + % endif @@ -54,7 +54,6 @@ ${parent.title()} % endfor
#NickScore#NickScore
${i}${score_nick|n}${score_nick|n}${score_nick}${score_nick}${score_value}
-

*Most active stats are from the past 7 days

@@ -63,9 +62,9 @@ ${parent.title()} - - - + + + @@ -74,9 +73,9 @@ ${parent.title()} % if player_id != '-': - + % else: - + % endif @@ -92,9 +91,9 @@ ${parent.title()}
#NickPlaying Time#NickPlaying Time
${i}${nick|n}${nick|n}${nick}${nick}${alivetime}
- - - + + + @@ -102,7 +101,7 @@ ${parent.title()} % for (server_id, name, times_played) in top_servers: - + <% i = i+1 %> @@ -112,6 +111,12 @@ ${parent.title()} +
+
+

*Most active stats are from the past 7 days

+
+
+ % if len(captimes) > 0:
diff --git a/xonstat/templates/server_info.mako b/xonstat/templates/server_info.mako index 5c2cf73..3bb1adc 100644 --- a/xonstat/templates/server_info.mako +++ b/xonstat/templates/server_info.mako @@ -38,9 +38,9 @@ Server Information
#NameTimes Played#Name# Games
${i}${name}${name} ${times_played}
- - - + + + @@ -49,9 +49,9 @@ Server Information % if score_player_id != '-': - + % else: - + % endif @@ -68,9 +68,9 @@ Server Information
#NickScore#NickScore
${i}${score_nick|n}${score_nick|n}${score_nick}${score_nick}${score_value}
- - - + + + @@ -79,9 +79,9 @@ Server Information % if player_id != '-': - + % else: - + % endif @@ -97,9 +97,9 @@ Server Information
#NickPlaying Time#NickPlaying Time
${i}${nick|n}${nick|n}${nick}${nick}${alivetime}
- - - + + + @@ -108,9 +108,9 @@ Server Information % if map_id != '-': - + % else: - + % endif diff --git a/xonstat/views/map.py b/xonstat/views/map.py index cd6f80f..004f22a 100644 --- a/xonstat/views/map.py +++ b/xonstat/views/map.py @@ -166,7 +166,7 @@ def map_info_json(request): def map_captimes_data(request): map_id = int(request.matchdict['id']) - + MapCaptimes = namedtuple('PlayerCaptimes', ['fastest_cap', 'create_dt', 'create_dt_epoch', 'create_dt_fuzzy', 'player_id', 'player_nick', 'player_nick_stripped', 'player_nick_html', 'game_id', 'server_id', 'server_name']) @@ -193,6 +193,7 @@ def map_captimes_data(request): "AND pgs.player_id = ct.player_id " "AND pgs.game_id = ct.game_id " "ORDER BY ct.fastest_cap " + "LIMIT 25" ).params(map_id=map_id).all() mmap = DBSession.query(Map).filter_by(map_id=map_id).one()
#Map# Games#Map# Games
${i}${name}${name}${name}${name}${count}