]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/map_info.mako
Integrate navigation mako file and titles.
[xonotic/xonstat.git] / xonstat / templates / map_info.mako
1 <%inherit file="base.mako"/>
2 <%namespace name="nav" file="nav.mako" />
3 <%namespace file="navlinks.mako" import="navlinks" />
4
5 <%block name="navigation">
6 ${nav.nav('maps')}
7 </%block>
8
9 <%block name="title">
10 % if gmap:
11 Map Information for ${gmap.name}
12 % endif
13
14 ${parent.title()}
15 </%block>
16
17
18 % if gmap is None:
19 <h2>Sorry, that map wasn't found!</h2>
20
21 % else:
22 <h2>Map Detail - ${gmap.name}</h2>
23
24 ##### RECENT GAMES #####
25 <h2>Recent Games</h2>
26 <table id="recent-games">
27     <thead>
28         <tr>
29             <th>Game #</th>
30             <th>Type</th>
31             <th>Time</th>
32             <th>Winner</th>
33         </tr>
34     </thead>
35     <tbody>
36     % for (game, srv, map, pgstat) in recent_games:
37         % if game != '-':
38         <tr>
39             <td><a href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">${game.game_id}</a></td>
40             <td class="gt_icon"><img title="${game.game_type_cd}" src="/static/images/icons/24x24/${game.game_type_cd}.png" alt="${game.game_type_cd}" /></td>
41             <td>${game.start_dt.strftime('%m/%d/%Y %H:%M')}</td>
42             <td class=
43             % if pgstat.team == 5:
44             "blue"
45             % elif pgstat.team == 14:
46             "red"
47             % elif pgstat.team == 13:
48             "yellow"
49             % endif
50             >
51             % if pgstat.player_id > 2:
52             <a href="${request.route_url('player_info', id=pgstat.player_id)}" title="Go to the player info page for this player">${pgstat.nick_html_colors()|n}</a></td>
53             % else:
54             ${pgstat.nick_html_colors()|n}</td>
55             % endif
56         </tr>
57         % else:
58         <tr>
59             <td>-</td>
60             <td>-</td>
61             <td>-</td>
62             <td>-</td>
63         </tr>
64         % endif
65     % endfor
66     </tbody>
67 </table>
68
69
70 ##### TOP SCORERS #####
71 <div class="table_block">
72 <h2>Top Scoring Players</h2>
73 <table>
74     <thead>
75         <tr>
76             <th>#</th>
77             <th>Nick</th>
78             <th>Score</th>
79         </tr>
80     </thead>
81     <tbody>
82     <% i = 1 %>
83     % for (score_player_id, score_nick, score_value) in top_scorers:
84         <tr>
85             <td>${i}</td>
86             % if score_player_id != '-':
87             <td><a href="${request.route_url('player_info', id=score_player_id)}" title="Go to the player info page for this player">${score_nick|n}</a></td>
88             % else:
89             <td>${score_nick}</td>
90             % endif
91             <td>${score_value}</td>
92         </tr>
93         <% i = i+1 %>
94     % endfor
95     </tbody>
96 </table>
97 </div>
98
99
100 ##### TOP PLAYERS #####
101 <div class="table_block">
102 <h2>Most Active Players</h2>
103 <table id="top-players">
104     <thead>
105         <tr>
106             <th>#</th>
107             <th>Nick</th>
108             <th>Playing Time</th>
109         </tr>
110     </thead>
111     <tbody>
112     <% i = 1 %>
113     % for (player_id, nick, alivetime) in top_players:
114         <tr>
115             <td>${i}</td>
116             % if player_id != '-':
117             <td><a href="${request.route_url('player_info', id=player_id)}" title="Go to the player info page for this player">${nick|n}</a></td>
118             % else:
119             <td>${nick}</td>
120             % endif
121             <td>${alivetime}</td>
122         </tr>
123         <% i = i+1 %>
124     % endfor
125     </tbody>
126 </table>
127 </div>
128
129
130 ##### TOP SERVERS #####
131 <div class="table_block">
132 <h2>Most Active Servers</h2>
133 <table id="top-servers">
134     <thead>
135         <tr>
136             <th>#</th>
137             <th>Name</th>
138             <th>Times Played</th>
139         </tr>
140     </thead>
141     <tbody>
142     <% i = 1 %>
143     % for (server_id, name, times_played) in top_servers:
144         <tr>
145             <td>${i}</td>
146             <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for this server">${name}</a></td>
147             <td>${times_played}</td>
148         </tr>
149         <% i = i+1 %>
150     % endfor
151     </tbody>
152 </table>
153 </div>
154
155
156 % endif