]> de.git.xonotic.org Git - xonotic/xonstat.git/blob - xonstat/templates/map_info.mako
Gridify the map info page.
[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
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 <div class="row">
23   <div class="span12">
24     <h2>${gmap.name}</h2>
25
26     <h3>Recent Games</h3>
27     <table class="table table-bordered table-condensed">
28       <thead>
29         <tr>
30           <th>Game #</th>
31           <th>Type</th>
32           <th>Time</th>
33           <th>Winner</th>
34         </tr>
35       </thead>
36       <tbody>
37         % for (game, srv, map, pgstat) in recent_games:
38         % if game != '-':
39         <tr>
40           <td><a href="${request.route_url('game_info', id=game.game_id)}" title="View detailed information about this game">${game.game_id}</a></td>
41           <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>
42           <td>${game.start_dt.strftime('%m/%d/%Y %H:%M')}</td>
43           <td>
44             % if pgstat.player_id > 2:
45             <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>
46           </td>
47             % else:
48             ${pgstat.nick_html_colors()|n}
49           </td>
50             % endif
51         </tr>
52         % else:
53         <tr>
54           <td>-</td>
55           <td>-</td>
56           <td>-</td>
57           <td>-</td>
58         </tr>
59         % endif
60     % endfor
61         </tbody>
62     </table>
63   </div>
64 </div>
65
66
67 <div class="row">
68   <div class="span4">
69     <h3>Top Scoring Players</h3>
70     <table class="table table-bordered table-condensed">
71       <thead>
72         <tr>
73           <th>#</th>
74           <th>Nick</th>
75           <th>Score</th>
76         </tr>
77       </thead>
78       <tbody>
79         <% i = 1 %>
80         % for (score_player_id, score_nick, score_value) in top_scorers:
81         <tr>
82           <td>${i}</td>
83           % if score_player_id != '-':
84           <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>
85           % else:
86           <td>${score_nick}</td>
87           % endif
88           <td>${score_value}</td>
89         </tr>
90         <% i = i+1 %>
91         % endfor
92         </tbody>
93     </table>
94   </div>
95
96
97 <div class="span4">
98   <h3>Most Active Players</h3>
99   <table class="table table-bordered table-condensed">
100     <thead>
101       <tr>
102         <th>#</th>
103         <th>Nick</th>
104         <th>Playing Time</th>
105       </tr>
106     </thead>
107     <tbody>
108     <% i = 1 %>
109     % for (player_id, nick, alivetime) in top_players:
110       <tr>
111         <td>${i}</td>
112         % if player_id != '-':
113         <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>
114         % else:
115         <td>${nick}</td>
116         % endif
117         <td>${alivetime}</td>
118       </tr>
119       <% i = i+1 %>
120     % endfor
121     </tbody>
122   </table>
123 </div>
124
125
126 <div class="span4">
127   <h3>Most Active Servers</h3>
128   <table class="table table-bordered table-condensed">
129     <thead>
130       <tr>
131         <th>#</th>
132         <th>Name</th>
133         <th>Times Played</th>
134       </tr>
135     </thead>
136     <tbody>
137     <% i = 1 %>
138     % for (server_id, name, times_played) in top_servers:
139       <tr>
140         <td>${i}</td>
141         <td><a href="${request.route_url('server_info', id=server_id)}" title="Go to the server info page for this server">${name}</a></td>
142         <td>${times_played}</td>
143       </tr>
144       <% i = i+1 %>
145     % endfor
146     </tbody>
147 </table>
148 </div>
149
150 </div> <!-- /row -->
151
152 % endif